Dec-16-2017, 05:22 AM
I'm having some trouble with this code:
def is_hot (N):
if N<2:
return ("cold")
elif is_hot(N/2) > 1 or is_hot(N-1) > 1:
return ("hot")
n = float(input(("Enter Number: ")))
is_hot(n)
as I keep getting the following error: TypeError: '>' not supported between instances of 'str' and 'int'
Does anyone know why this could be the case?
def is_hot (N):
if N<2:
return ("cold")
elif is_hot(N/2) > 1 or is_hot(N-1) > 1:
return ("hot")
n = float(input(("Enter Number: ")))
is_hot(n)
as I keep getting the following error: TypeError: '>' not supported between instances of 'str' and 'int'
Does anyone know why this could be the case?