Calculate days in a month
From CompSciWiki
COMP 1010 Home > Back to Extra Labs
IntroductionIn this program, you will be taught how to use if, elseif and else conditional statements in Python. if/else/elseif syntax in Pythonif (expression): Statement(s) elif (expression): Statement(s) else: Statement(s) As you may have noticed, Python uses elif in place of elseif in Java. Also, Python is a little picky about indentation; hence it is recommended that you use the if, elif and else syntax as shown above. ProblemWrite a Python program that displays the days in a month. |
---|
Step 1:
Bla9;
Bla2.