Could you explain where i'm going wrong with this code? I want to do a bisection search which takes input number and repeats bisection search until it finds the same number as input and prints out various statements.
num =int( input("Please think of a number between 0 and 100!"))
maximum = num
minimum = 0
average = (minimum+maximum)/2.0
while(average<num):
print ("Is your secret number ", +average, "?")
cond = input("Enter 'h' to indicate the guess is too high.Enter 'l' to indicate the guess is too low.Enter 'c' to indicate I guessed correctly.")
if( cond == "h"):
maximum = minimum
minimum = 0
elif(cond == "l"):
minimum = maximum
maximum = 100
elif(cond == "c"):
print("Game over. Your secret number was: ", +average)
break