[Tutor] Help with guess my number game

Danny Yoo dyoo at hashcollision.org
Mon Oct 13 22:06:26 CEST 2014


>
>     if guess != the_number:
>
>         print ("you failed, the number was", the_number)
>
>     elif guess==the_number:
>
>         print("You guessed it!  The number was", the_number)
>
>         print("And it only took you", tries, "tries!\n")


This block of code appears to be applied for every iteration through
your loop.  Is that your intention?


More information about the Tutor mailing list