[Tutor] Help Request: Nested While commands

Chris Calloway cbc at unc.edu
Fri Aug 24 21:02:47 CEST 2007


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, Colorado
> The Technological Capital of Mid Central Eastern El Paso County, Colorado.

Nice.

-- 
Sincerely,

Chris Calloway
http://www.seacoos.org
office: 332 Chapman Hall   phone: (919) 962-4323
mail: Campus Box #3300, UNC-CH, Chapel Hill, NC 27599



More information about the Tutor mailing list