You also can place:
else:
print " this is not a number"
And:
if guess == number:
break
if guess == number:
guessesTaken = str(guessesTaken)
print 'Good job, ' + myName + "! You guessed the number in " +
guessesTaken + ' guesses!'
which could be combined.
if guess == number:
guessesTaken = str(guessesTaken)
print 'Good job, ' + myName + "! You guessed the number in " +
guessesTaken + ' guesses!'
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor