import random n = random.randint(1, 99) guess = int(raw_input("Enter an integer from 1 to 99: ")) while n != "guess": print if guess < n: print "guess is low" guess = int(raw_input("Enter an integer from 1 to 99: ")) elif guess > n: print "guess is high" guess = int(raw_input("Enter an integer from 1 to 99: ")) else: print "you guessed it!" break print
—from Guessing Game, a other by www.pythonforbeginners.com
Active since October 3, 2018.
388 total characters in this text.
View Pit Stop page for this text
Universe | Races | Average WPM | First Race |
---|---|---|---|
Coder Edition | 6,022 | 59.33 | October 3, 2018 |