import random realnum = random.randint( 1, 100 ) usernum = 0 while realnum != usernum : usernum = int( input( "Guess the number: " ) ) if usernum > realnum : print( "Lower!" ) if usernum < realnum : print( "Higher!" ) if usernum == realnum : print( "You got it" )