import random number = random.randint(range(1, 101)) print("I am thinking of a number between 1 and 100") hi = input("Press y to start: ") while hi == "y": answer = int(input("What is it?: ")) if answer > number: print("Lower!.") elif answer < number: print("Higher!") else: print("You got it!") break else: print("Bye bye") #works