# I Got 99 Problems, But a Switch Ain't One

#1

It says there's a syntax error, but I've done what other users have said to do.

``````def greater_less_equal_5(answer):
if  > 5 :
return 1
elif < 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

if > 5 :
return 1
elif < 5:
return -1
else:
return 0

#3

I tried doing this

if 6 > 5:
return 1
elif 4 < 5:
return -1
else:
return 0

yet i still get this error: "Oops, try again. It looks like your function output 1 instead of -1 when answer is 3. Make sure you filled in the if and elif statements correctly!"

anyone help

#4

did you happen to try yilgul's suggestion? you have a comparision with only one arg. if what is greater than 5 or less than 5?

#5

im so dumb why am i even passionate about learning to program xd

#6

return 1
return -1
else:
return 0

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

#7

I know the feeling dude

#8

@therobinhood @jamescoderchamp Don't get discouraged so easily. Nothing is easy to achieve. As for @lordruhland , you never use the parameter "answer" in you actual code. You code needs to be like this:

``````def greater_less_equal_5(answer):
return 1
return -1
else:
return 0

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

Hope that helps! Let me know if you still don't understand.

#9

Thank you !

#10

You're welcome!

#11

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