I'm writing a simple program that compares two variables
from random import randint
result = (randint(1, 6))
guess = input('Guess the number: ')
if guess == result:
print('You got it right')
else:
print('Wrong')
print(result)
The program sets the variable result
as a random number, and then the user inputs a number that they guess. However, even when they get the number right, it says that they were wrong.
How can I get it so that when they get the correct number, it says that they are right?
Thanks in advance!