I've tried a few different things but nothing seems to work. COuld some one help me :)


Oops, try again. Your code looks a bit off. Check the Hint if you need help! Your code threw the following error: invalid syntax (python, line 2)

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


In your logic you put:


What are you trying to compare to 5?

Right now your logic is incomplete.


do i need to put an equation to complete it. I looked at some other topics and thats how some of them had it


Their code is incorrect.

You must compare answer to 5.


oh ok i got it Thx!

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


You're Welcome!

Always post if you're confused. :slightly_smiling: