import random

secret = random.randint(1,100)
tries = 0

print("GUESS THE NUMBER")
print("I'm thinking of a number between 1 and 100!")

while True:
    answer = input("Your guess: ")
    if not answer.strip().isdigit():
        print("Please type a number.")
        continue
    guess = int(answer)
    tries = int(tries) + 1

    if guess < secret:
        print("Too low! Guess higher!")
    elif guess > secret:
        print("Too high! Guess lower!")
    else:
        print("That's the number!")
        print("You guessed right after", tries, "tries!")
        if tries == 1:
            print("FIRST TRY!?")
        elif tries < 10:
            print("You started close!")
        elif tries > 15:
            print("Take your time...")
        else:
            print("Nice job!")
        break
