I am stuck in 5/14...please help


#1

Q) On line 2, fill in the if statement to check if answer is greater than 5.
On line 4, fill in the elif so that the function outputs -1 if answer is less than 5.

 def greater_less_equal_5(answer):
if ________:
    return 1
elif ________:          
    return -1
else:
    return 0

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

error message Oops, try again. It looks like your function output 1 instead of -1 when answer is 3. Make sure you filled in the if and elif statements correctly!


#2

Hi, @adityasureshgurjar ,

It looks like you are on Exercise 14: I Got 99 Problems, But a Switch Ain't One.

Have you replaced the underscores with conditional expressions? You need to do so for your code to work. For instance, the first sequence needs to be replaced by answer > 5, so that the line reads ...

if answer > 5:

#3

thankyou so much @appylpye