Rediculous directions 99 Problems and a Switch Aint One of Them


#1



https://www.codecademy.com/courses/python-beginner-BxUFN/3/4


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.


#2

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
    else:
        return 0
        
print greater_less_equal_5(4)
print greater_less_equal_5(5)
print greater_less_equal_5(6)

Instructions

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.


#4

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