Jul-20-2017, 06:45 PM
I don't understand what the (answer), (4), (5), or (6) they want.
On line 4, fill in the elif so that the function outputs -1 if answer is less than 5
Those are the instructions but I am confused because I don't know if they want line 2 to print out 4 what conditional I need to use to get the code to return -1. I know the greater, less than equal to permutations but do i need the logical operators in if/elif code?
def greater_less_equal_5(answer): if 2 + 2: return 1 elif 6 - 1: return -1 else: return 0 print greater_less_equal_5(4) print greater_less_equal_5(5) print greater_less_equal_5(6)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
Those are the instructions but I am confused because I don't know if they want line 2 to print out 4 what conditional I need to use to get the code to return -1. I know the greater, less than equal to permutations but do i need the logical operators in if/elif code?