import random num1=(random.randint(1,100)) num2=0 while num2 != num1: if num2>num1: print("lower!") else: print("higher!") num2=int(input("guess the number:")) if num2==num1: print("you got it!")