I want to assign something a value and then try and get someone to guess that value. I have tried something along the lines of this but I can't seem to get it to work...:
foo = 1
guessfoo = input('Guess my number: ')
if foo == guessfoo:
print('Well done, You guessed it!')
if foo != guessfoo:
print('haha, fail.')
Why doesn't this work? And how should I be doing it? I am a beginner at this, please help!
See Question&Answers more detail:os