python Write a program that prompts the user to enter the month and year and displays the number of days in the month. For example, if the user entered month 2 and year 2000, the program should display that February 2000 has 29 days. If the user entered month 3 and year 2005, the program should display that March 2005 has 31 days.

Respuesta :

Answer:

program

Explanation:

Program that prompts the user to enter the month and year and displays the number of days in the month:

1. print("List of months: January, February, March, April, May, June, July, August, September, October, November, December")

2. month_name = input("Input the name of Month: ")

if month_name == "February":

print("No. of days: 28/29 days")

elif month_name in ("January", "March", "May", "July", "August", "October", "December"):

print("No. of days: 31 day")

elif month_name in ("April", "June", "September", "November"):

print("No. of days: 30 days")

else:

print("Wrong month name")