import random  # This module helps generate a random number
# Generate a random number between 1 and 10
number_to_guess = random.randint(1, 10)
guess = None  # Initialize the guess variable

print("Welcome to the Guess the Number game!")
print("I'm thinking of a number between 1 and 10. Can you guess it?")

# Start a loop to keep asking for a guess until the user gets it right
while guess != number_to_guess:
    guess = int(input("Enter your guess: "))  # Convert the input to an integer
    
    if guess < number_to_guess:
        print("Too low! Try again.")
    elif guess > number_to_guess:
        print("Too high! Try again.")
    else:
        print(f"Congratulations! {guess} is the correct number.")

print("Thanks for playing!")
