I got 99 problems but a switch aint one


hey i am stuck with this lesson this is my code : def greater_less_equal_5(answer):
if > 5 :
return 1
elif < 5 :
return -1
return 0

print greater_less_equal_5(4)
print greater_less_equal_5(5)
print greater_less_equal_5(6)

it gives this error :Oops, try again. Your code looks a bit off. Check the Hint if you need help! Your code threw the following error: invalid syntax (python, line 2)


you need answer in your if and else statements so for example:

if answer > 5 :


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.