why doesn't it work | Sololearn: Learn to code for FREE!


why doesn't it work


5/3/2021 6:54:39 PM


4 Answers

New Answer


remove all indents before if.


from the expression "print(nice)".. Nice is a variable that doesn't exist, you have to define it at the top level of your code maybe line 5 nice = "nice" I'll also inform you that every other conditions depends on the first condition. This means, the first input must be "January" otherwise they won't be executed. I don't think this exact behavior is how you wanted it to be and to correct that would be stressful, i'll suggest you read more on how conditional statement, indentation works in python


Why don't you use switch case or else use dictionary to solve this problem


thanks for the answers. I have removed all indents before de if and it works now.