Write a program to print the name of months in python.
Pls help.
Answers
Answered by
0
print("List of months: January, February, March, April, May, June, July, August, September, October, November, December")
month_name = input("Input the name of Month: ")
if month_name == "February":
print("No. of days: 28/29 days")
elif month_name in ("April", "June", "September", "November"):
print("No. of days: 30 days")
elif month_name in ("January", "March", "May", "July", "August", "October", "December"):
print("No. of days: 31 day")
else:
print("Wrong month name")
Answered by
0
import datetime
for i in range(1, 13):
print(datetime.date(2020, i, 1).strftime("%B"))
Similar questions
Biology,
6 months ago
Computer Science,
6 months ago
Sociology,
11 months ago
Business Studies,
11 months ago