Rediculous directions 99 Problems and a Switch Aint One of Them


I used several comparisons and it still says it returned one or negative one when the the answer is 5 or 0 or some gobbledygook. Please teachers need to sepperate mathmatic 'should' from situational 'should'. English natives don't understand it from the looks of the forum. Worse yet this is precisely the kind of thing that will anger your users. It's impossible to understand if should means the reference equation/statement or the paragraph or the entire excercise. This is like asking someone to open your house with a six digit code with pencil and paper and not take more than an hour, get arrested or stay overnight. This is just bad.

Replace this line with your code.


Given a nearly complete setup, and instructions that are easy to follow, this should be a cake walk...

def greater_less_equal_5(answer):
    if ________:
        return 1
    elif ________:          
        return -1
        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.

Nothing ridiculous about those instructions.


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