Re: [Tutor] Help Request: Nested While commands

2007-08-25 Thread Luke Paireepinart
Paul W Peterson wrote: > > Greeting! Greeting. Can you please make a new message next time you post to the list, instead of replying to an existing message and changing the subject line? There is more to an e-mail than just the subject, and threaded mail clients notice whether an e-mail is comple

Re: [Tutor] Help Request: Nested While commands

2007-08-24 Thread Chris Calloway
Paul W Peterson wrote: > Could you provide a way to achieve this > using nested while statements, or suggest a better use of the ifs? You could use one while statement. while guess != the_number and tries < 5: I can't think of a *good* way to use nested whiles for your problem. > Ellicott, Col

Re: [Tutor] Help Request: Nested While commands

2007-08-24 Thread Alan Gauld
"Paul W Peterson" <[EMAIL PROTECTED]> wrote > "Guess my number" (code pasted below). His challenge is to modify the > code so that there are only a limited number of attempts before the > program exits with a chastising message. > > Try as I may, I cannot seem to get the syntax correct for nes

[Tutor] Help Request: Nested While commands

2007-08-24 Thread Paul W Peterson
Greeting! I'm learning Python through the book "Python Programming, Second Edition for the absolute beginner" by Michael Dawson. In it, he has the program "Guess my number" (code pasted below). His challenge is to modify the code so that there are only a limited number of attempts before the progr