""" guess a number pseudocode: choose secret number get guess from user while guess is incorrect tell user 'too high' or 'too low' get guess from user tell user they are correct """ # pick a random integer between 1 and 100 import random secret = random.randint(1, 100) while True : guess = input("Enter your guess (between 1 and 100): ") if guess < secret : print "too low" elif guess > secret: print "too high" else: break print secret, "is the correct answer"