Stuck on elif exercise


Oops, try again. It looks like your function output 0 instead of -1 when answer is 3. Make sure you filled in the if and elif statements correctly!

I expect it to be working, but the error says it should be -1 when the answer is 3, and there is no 3 answer given

def greater_less_equal_5(answer):
    if answer > 5:
        return 1
    elif answer < -5:          
        return -1
        return 0
print greater_less_equal_5(4)
print greater_less_equal_5(5)
print greater_less_equal_5(6)


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

less then 5, not less then -5


Sorry, im so ashamed.. Thank you! :smiley:


no need to be ashamed, you are here to learn :slight_smile: Good to hear the issue was resolved