# Arup Guha
# 9/24/2020
# Guessing Game - keeps track of # of guesses.

import random

# Generate the secret number.
secret = random.randint(1,100)

# Get the first guess.
guess = int(input("What is your first guess 1-100) for the secret number?\n"))

# Keeps track of # of guesses.
numGuesses = 1

# Keep going till they get it!
while guess != secret:

    # Give a message so they can improve their guess.
    if guess > secret:
        print("Your guess was too high. Guess lower.")
    else:
        print("Your guess was too low. Guess higher.")

    # Get next guess and update # of guesses.
    guess = int(input("What is your next guess?\n"))
    numGuesses = numGuesses + 1

# Print a winning message.
print("Congrats, you got the secret number in",numGuesses,"guesses.")
