Typo in 14. "I Got 99 Problems, But a Switch Ain't One"


#1

Right before the instructions of "I Got 99 Problems, But a Switch Ain't One" it says:

In the example above, the elif statement is only checked if the original if statement if False.

I think it should say:

In the example above, the elif statement is only checked if the original if statement is False.

Please fix this. Thank you :slight_smile:


#2

I have a doubt and i don't know how to ask the concerned ppl. In python coarse in the 14. "I got 99 problems, but a Switch Ain't one" I m stuck in the second statement. In the elif they have asked us to make the condition less than 5. I did so and still got an error. If someone can pls tell me how to fix it.


#3

Try this code it worked for me

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

print greater_less_equal_5(2)
print greater_less_equal_5(4)
print greater_less_equal_5(6)

#4

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