On 7/08/2014 1:25 PM, Seymore4Head wrote:
This part was added as an exercise.
A counter is added to give 3 tries to guess the number.
It is supposed to stop after count gets to 3. It doesn't. It just
keeps looping back and asking for another guess.
You've misread the exercise:
Modify the higher or lower program from this section to keep track of
how many times the user has entered the wrong number. If it is more
than 3 times, print "That must have been complicated." at the end,
otherwise print "Good job!"
There's nothing there about breaking out of the loop after 3 attempts,
just producing a different end message on successful completion based on
how many attempts were made.
The Wikibooks example works as specified.
--
https://mail.python.org/mailman/listinfo/python-list