While Alan has given you a far better solution, I feel someone should
mention the break statement as you will likely come across it a lot, and it
is quite an important flow control statement.
You could add a break statement to the else which would break out of the
while loop.
https://docs.python.o
On Wed, Dec 10, 2014 at 11:20:12PM -0500, Matthew Nappi wrote:
> I am working on the challenges from “Python Programming for the Absolute
> Beginner” Chapter 3. I am asked to modify the original code pasted below
> to limit the number of guesses a player has to guess the number. I did so
> (code
On 11/12/14 04:20, Matthew Nappi wrote:
(code pasted below); however if a player guesses the right number they
still receive an ending message indicating that they failed. How can I
modify the code without using any advanced techniques to have a different
message in the event of a successful gu
Hello All:
I am working on the challenges from “Python Programming for the Absolute
Beginner” Chapter 3. I am asked to modify the original code pasted below
to limit the number of guesses a player has to guess the number. I did so
(code pasted below); however if a player guesses the right numb