# The loop keeps running until the player guesses the secret number
secret = 7
guessed = False

while not guessed:
    guess_text = input("Guess the number of galleons (1-10): ")
    guess = int(guess_text)

    if guess == secret:
        print("Correct! The vault opens.")
        guessed = True
    elif guess < secret:
        print("Too low — try again.")
    else:
        print("Too high — try again.")
