Conditionals & Control Flow I Got 99 Problems, But a Switch Ain't One


#1

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

print greater_less_equal_5(4)
print greater_less_equal_5(5)
print greater_less_equal_5(6)

can any one help me
what wromg in this code


#2

It's missing indentation.

Do you mean something else? If so, please post the code with intact indentation and explain what that other something is so that those replying can focus on the problem rather than trying to guess what you're looking for


#3

def greater_less_equal_5(answer):
if 1 < 5:
return 1
elif (-2**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)

can any one help me to solve this program


#4

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