[Tutor] guess-my-number programme
Emile van Sebille
emile at fenx.com
Fri Sep 23 22:22:31 CEST 2011
On 9/23/2011 12:25 PM ADRIAN KELLY said...
<snip>
> can anyone explain the *tries * part of this programme to me i know its
> meant to count the number of guesses made by the user by adding 1 but i
> just cant figure out how it does this..........can someone explain??
> i.e. tries = 1, tries +1 etc.... cant get my head around it...
>
tries = tries + 1
This simply increments tries by one each time through the loop. So the
first time through it takes on the value 2, then 3, then 4, etc.
Emile
More information about the Tutor
mailing list