import random low = 1 up = 100 random_number = random.randint(low, up) guess = int(input("Guess the number: ")) while guess != random_number: if guess < random_number: print("The number is higher!") elif guess > random_number: print("The number is lower!") guess = int(input("Guess the number: ")) print("That's the number!!!")