Number Guessing Game

Step 2: Guess until right

Ask again and again. Say higher or lower, and stop when the guess is right.

while True:
    guess = int(input("Guess: "))
    if guess == secret:
        print("Yes!")
        break
    elif guess < secret:
        print("Higher")
    else:
        print("Lower")
Need a hint?

break ends the loop when the guess is right.

Others asked

Done