Stuck on elif exercise


#1



https://www.codecademy.com/courses/python-beginner-BxUFN/3/4?curriculum_id=4f89dab3d788890003000096#


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
    else:
        return 0
        
print greater_less_equal_5(4)
print greater_less_equal_5(5)
print greater_less_equal_5(6)


#2

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


#3

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


#4

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


#5