import random num = random.randint(1,100) play="y" print("I'm thinking of a number...") while play == "y": guess=int(input("Guess the number:")) if guess == num: print("You got it") play="n" if guess > num: print("lower!") if guess < num: print("higher!")