[Tutor] Fwd: Re: Help with guess my number game

Danny Yoo dyoo at hashcollision.org
Mon Oct 13 22:43:10 CEST 2014


---------- Forwarded message ----------
From: אופיר לירון <ofir_l at walla.com>
Date: Mon, Oct 13, 2014 at 1:20 PM
Subject: Re: Re: [Tutor] Help with guess my number game
To: Danny Yoo <dyoo at hashcollision.org>



Hi Danny

Thanks for your response,

I think it is part of the problem, but my intention was to end the
first loop only after 5 tries.

I don't understand why the code go to the print section after only two
gusses and not five. and it also reveal the_number before the game
end.

Again thank for your help.

Ofir

________________________________
שולח: Danny Yoo,
נושא: Re: [Tutor] Help with guess my number game

>
> 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?

________________________________
Walla! Mail - Get your free unlimited mail today


More information about the Tutor mailing list