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


#1

What is wrong with my code?
def greater_less_equal_5(answer):
    if answer>5:
        return 1
    elif answer=-1          
        return -1
    else:
        return 0
        
print greater_less_equal_5(4)
print greater_less_equal_5(5)
print greater_less_equal_5(6)

#2

Did you mean to write,

elif answer < 5:

?


#3

Wait NVM mtf you are right!!!


#4

Thank you very much :grinning:


#5

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