Create a dictionary that contains twelve three-letter abbreviations for each month as the keys and the number of days in each month as the values….

  

Create a dictionary that contains twelve three-letter abbreviationsfor each month as the keys and the number of days in each month as the values. Use initial caps for the abbreviations and the following values for each key: -Jan, Mar, May, Jul, Aug, Oct, Dec should all use 31 -Apr, Jun, Sep, Nov should all use 30 -Feb should use 28Output the dictionary, followed by a blank line, before any other output.You will then ask the user to input a three-letter abbreviation for month, a numeric day, and a numeric year.If the user’s input is a valid date, output a message similar to the following:Jan 1, 1994 is a valid date.If the user’s input isn’t a valid date, output a message similar to the following:Jan 0, 1994 isn’t a valid date.A valid date will meet these conditions: -The abbreviation matches one of the 12 keys in the dictionary you have created. -The day falls within the range of valid days for the month and year (see note about leap years). -The year must be 1752 or after, the year the United States adopted the Gregorian Calendar.For leap years: -Leap years are divisible by 4 and not by 100 or they are divisible by 400. -If a year is a leap year, February should be allowed to have 29 days. -You should handle this exception without adding anything extra to the dictionary. Computer Science Engineering & Technology Python Programming

Don't use plagiarized sources. Get Your Custom Essay on
Create a dictionary that contains twelve three-letter abbreviations for each month as the keys and the number of days in each month as the values….
Just from $13/Page
Order Essay
  

Leave a Reply

Your email address will not be published.

Related Post

Open chat
💬 Need help?
Hello 👋
Can we help you?