it prints out 1

i want it to print out -1

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


Step 1.) says: On line 2, fill in the if statement to check if answer is greater than 5. notice in your function you have a parameter answer. Try using answer instead of greater_less_equal :thumbsup:


Thanks :slight_smile:
i should have known that :sweat_smile:
it worked


No problem! :smiley: Glad to have helped! It is a very tricky lesson and I have seen many just not realize so its too easy to do xD


i don't really feel like i can do anything even after finishing these courses


What do you mean exactly? Just confused about something in general or discouraged something ain't working out right?


like in general, i cant think of anything productive to do.


Well do you have goals set of things you want to do? Are you just bored with lessons in Python? Sometimes taking a break or trying something new or setting out a goal or project you want to work towards or create can elevate feelings of unproductive or no purpose.


Thanks, I'll keep it in mind. yea i do have something i want to do.


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