>
>
> I want to limit the number of tries to 5. To do that, I have tried the
> /_if structure_/ along with the /_break statement_/ immediately below the
>
> ‘tries += 1’ line:
>
Or you could just add this condition to the while loop.
while (guess != the_number and tries < 6):
>
> if tries > 5:
>
>
2007/3/20, Alexander Kapshuk <[EMAIL PROTECTED]>:
Dear All,
I have been learning computer programming with Python only for a short
while. I have a question to do with breaking the *while loop*.
I have attached the source code of a program called 'Guess my number' with
the *while loop* run
Dear All,
I have been learning computer programming with Python only for a short
while. I have a question to do with breaking the while loop.
I have attached the source code of a program called 'Guess my number'
with the while loop running until the right number is guessed.
I want to li