Answers for "5.3.7 higher/ lower"

0

5.3.7 higher/ lower

magic_number = 3

# Your code here...
while True:
    user_guess = int(input("Please guess a number between 1 and 100: "))
    if user_guess == magic_number:
        print ("Correct!")
        break
    elif user_guess < magic_number:
        print ("Too low, try again.")
    else:
        print ("Too high, try again.")
Posted by: Guest on December-16-2020

Browse Popular Code Answers by Language