def func(val):
num = int(input("Enter a number:"))
if num>val:
print ("Too high!")
return 1
elif num:
print ("Too low!")
return -1
else:
print ("Got it!!")
return 0
ch=1
while(ch!=0):
ch=func(15)
I keep getting the error: "elif num: ^ SyntaxError: invalid syntax" Is it simply a formatting issue that is causing this error message? or my code?
returns are incorrectly indented.