import random score = 0 number = random.randint(1, 50) answer = 0 while answer!= number: answer = int(input("guess a number")) if answer < number :print("too low!") elif answer==number :print("you win!") else: print("too high!")