def higher_lower_game(): number to guess = random.randint(1, 100) attempts = 0 guessed = False while not guessed: try: guess = int(input("Take a guess: 17")) attempts += 1 if guess < number_to_guess: print("Higher!") elif guess > number_to_guess: print("Lower!") else: guessed = True print(f"Congratulations! You've guessed the number {number_to_guess} in {attempts} attempts.") if _name_ = "_main_": higher lower game()