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

0

why doesn't it work

https://code.sololearn.com/cJ6z9Pt3yGGM/?ref=app

5/3/2021 6:54:39 PM

Dico

4 Answers

New Answer

+1

remove all indents before if.

+3

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

+2

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

0

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