def guessing_game(secret) :
'''
Takes an integer @secret as an argument, and
repeatedly prompts the user to guess a number until they guess correctly.
- Tells the user "guess higher" or "guess lower" after each incorrect guess.
- When the correct number is guessed, prints "Correct guess!"
'''
guess = int(input("guess the secret number: "))
# stop guessing once the guess matches the secret
while guess != secret :
# if the secret is higher, tell them
if guess < secret :
guess = int(input("guess higher: "))
# if the secret is not higher, tell them
else :
guess = int(input("guess lower: "))
# outside the loop
print("correct guess!")
if __name__ == "__main__":
secret = input("pick a secret number: ")
guessing_game(int(secret))