Python: "Conditionals and Control Flow" Section 14


#1

What am I doing wrong here? I would love the input! Thanks!

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

#2

Copying the example. Your code should be using the parameter, answer, in the conditionals.


#3

I am sorry, but I don't quite understand your meaning. Could I have an example of what you are talking about?


#4

if ________:

What does the exercise ask us to do? Read the instructions carefully.


#5

2 posts were split to a new topic: We think that it will return the correct answer based on a true/false condition


#7

#8

#9

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