def check_the_guess(guessed_number, number_to_guess, attempts_left):
    """ compare the player's guess with the random number to be guessed, provide a feedback """
    if guessed_number == number_to_guess:
        return True
    else:
        if guessed_number > number_to_guess:
            print("Your number is too high!", end="")
        elif guessed_number < number_to_guess:
            print("Your number is too low!", end="")
    
        if attempts_left > 0:
            print(" Try it again!")
            print(f"\tAttempts left: {attempts_left} ...")
            return False
        else:  
            print(f"\n\tAttempts left: {attempts_left} ...")
            return True