Here is my code:
import random
def guessGame(x):
    low=1
    high=x
    feedback=" "
    while feedback != "c":
        if high!=low:
            guess=int(random.randint(low,high))
        else:
            guess=low
        feedback= input(f"Is it {guess} too high(H),too lowe(L) or correct(C)?").lower()
        if feedback == "h":
            high = guess-1
        elif feedback == "l":
            low=guess+1
    print(f"I guess the correct number{guess}!")
x=input("Please input a highest number in the range: ")
guessGame(x)
I wrote a python code to ask my computer to guess a secret number. But it did not work. I did some changes but still do know where I did wrong.
 
    