I Got 99 Problems But a Switch Ain't one


Can anyone help with this. What ever I do is wrong and it's driving me mad.

def greater_less_equal_5(answer):
if ________:
return 1
elif ________:
return -1
return 0

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


Hi here

On line 2, fill in the if statement to check if answer is greater than 5

if answer > 5:
    return  1

On line 4, fill in the elif so that the function outputs -1 if answer is less than 5.

elif answer < 5:
    return -1



Thanks for your help it's much appreciated but that's not working either. I take it I don't need to do anything in the else line. This is driving crazy


Could you please post a link to the exercise, as @wizmarco's answer looks correct.


Thanks I've done it. Spent hours on it.