I have this GUESSING GAME code found below:
---------------------
import random
number = random.randint(1, 101)
print "I've thought of a number between 1 and 100."
print "Try and guess it!"
print
guess = input( "What's your guess? ")
while guess != number:
if guess > number:
print "Your guess is too high."
else: #elif guess < number:
print "Your guess is too low."
guess = input( "What's your next guess? " )
print "Congratulations! You guessed the number."
----------------------------------------------------
What do I have to do to the code so that the Guessing Game that tries to
guess a number the user has thought of. (Make sure it can tell if the user
tries to cheat, e.g. by changing the number during the game??
I hope you can help!
Chris
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.487 / Virus Database: 269.13.25/1018 - Release Date: 9/19/2007
3:59 PM
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor