Python, Conditionals & Control Flow exercise 14


There are errors with the indentation as well as the program when i input my code

I expected the program to run properly however, I am continually making the same mistake as I try to figure out what is going wrong.

Replace this line with your code.


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


There is a stray character (4) in the above line that will raise an error.

What about the parameter, answer? Shouldn't it be getting compared to 5? As it stands this function takes no input.

Mind that you have correct indentation inside the function, as well.


Thank you for the help and clarification.


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