I got 99 problems and a code is one


Ive got a python problem
The Python has escaped!!!
the code is behaving incorrectly.
Here is what i did.

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

whatever i did i the code will be in italic
has the python escaped?



You’re supposed to be working with the ‘answer’ and not making statements. Try comparing ‘answer’ to the number 5.

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


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