import random number = random.randint( 1, 100 ) print ("I'm thinking of a number between 1 and 100:") guess = int(input("Guess the number:")) while guess > number : print("Lower") guess = int(input("Guess the number:")) while guess < number : print("Higher") guess = int(input("Guess the number:")) if guess == number : print ("You got it")