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