It looks like your function output 1 instead of -1 when answer is 3


#1



https://www.codecademy.com/courses/python-beginner-BxUFN/3/4?curriculum_id=4f89dab3d788890003000096#

It looks like your function output 1 instead of -1 when answer is 3


def greater_less_equal_5(answer):
    if 6 - 8:
        return 1
    elif 3 < 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

Ok so is this #14 in Conditionals and Control Flow? because this looks just like that code but you did not follow the directions for the numbers. You also put this under 3.) string and console output. If that is the case then you need to have answer in your if and else statement and add > 5 and < 5 as the instructions tell you.


#3

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