3
Friends, I am starting out in programming, so I apologize if it is too banal my question. My guess is that something happens in the if string, because never the winning message is read, the program always reads the "Try Again', and that’s right if the number.
Could someone throw a light please?
import random
dada = random.randint(1, 6)
guess = input('Make a choice between the numbers: 1 and 6: ')
if dada == guess:
print('Congratulations! You won!')
else:
print('Try again.')
print('You selected the number {} and the number {} was sorted.'.format(guess, dada))
print("Let's play again!")
Thank you Daniel Mendes, it sure helped. Get mad about it here since yesterday, but what a silly mistake. But well, I think it’s just like that in the beginning. Thanks again.
– victor-c