Having zero luck with this section



I am having zero luck with this section and frustration has led me to just want the answer.
My code

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)

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

What am I not doing and what do I need to type?

99 Problems What am I doing wrong can someone give me the code and explain how they got it

There's your culprit. Remove = so else can return 0.


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