Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON CODE!! NEED ASAP WITH CORRECT OUTPUT SNAP!! DUE IN 3 HOURS!! PLEASE HELP!! THANKS IN ADVANCE PLEASE MAKE SURE TO CODE IN PYTHON LANGUAGE

PYTHON CODE!! NEED ASAP WITH CORRECT OUTPUT SNAP!! DUE IN 3 HOURS!! PLEASE HELP!! THANKS IN ADVANCE

image text in transcribed

image text in transcribed

image text in transcribed

PLEASE MAKE SURE TO CODE IN PYTHON LANGUAGE

.After you've created the list, insert it into the dictionary. The list will be the value, the month name will be the key .You might want to try printing out the dictionary to make sure it's filled correctly Part 3: User input Ask the user for a month and day. The user should be able to type the month and the day separated by a space. For example, "April 1" is valid input. You should handle a variety of invalid input. If the user enters in a bad month or a bad day, indicate the user's mistake. Any other invalid input should cause the program to re-prompt the user. Stop prompting for input when the user gives the empty string (or just hits enter with no input). .Prompt the user for an event to happen on the entered day. Add that to the appropriate place in the dictionary. HINT: The user will enter "1* for the first day in the month, but that item lives at index O. HINT: You can use split to separate the user's string into the text before the space and the text after the space . Sample output should look like this: Enter a date for a holiday (for example "July 1"): April 1 What happens on April, 1? April Fool's Enter a date for a holiday (for example July 1"): Movember 2 I don't know about the month "Movember" Enter a date for a holiday (for example July 1"): February 31 That month only has 28 days! Enter a date for a holiday (for example "July 1": December 12 1979 I don't see good input in there! Part 4: Display results .Display all the dates with events. If the date has no event, don't display it. . Sample output should look like this: Enter a date for a holiday (for example "July 1" April 1 What happens on April, 1? April Fool's Day Enter a date for a holiday (for example July 1"): December 24 What happens on December, 24? Christmas Eve Enter a date for a holiday (for example "July 1": July 12 What happens on July, 12? Bastille Day Enter a date for a holiday (for example July 1"): April 1 April Fool's Day July 12 Bastille Day December 24 : Christmas Eve A Note on Style Be sure to comment your code. Also, you will lose points if your variable names are not meaningful. Make sure you use variable names that correspond to what you are storing in the variables. Full Sample Output Below is sample output for a full run-through of the program. As usual, you are not required to be as descriptive as the text below, so long as you perform and display the required calculations. User input is in red. Enter a date for a holiday (for example "July 1" January 1 What happens on January, 1? New Year's Day Enter a date for a holiday (for example "July 1"): July 4 What happens on July, 4? Independence Day Enter a date for a holiday (for example "July 1": July 24 What happens on July, 24? Nathan's Birthday Enter a date for a holiday (for example "July 1"): December 31 What happens on December, 31? New Year's Eve Enter a date for a holiday (for example "July 1"): January 1 New Year's Day July 4 Independence Day July 24 Nathan's Birthday December 31: New Year's Eve Goodbye! Deliverables 1. A compressed folder containing hw05.py, named hw05.zip. Grading Item Part 1: Months dictionary Part 2: Calendar dictionary Part 3: User input Part 4: Display results Total Points will be deducted for poor code style, or improper submission. Points 10 10 30

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Managing Your Information How To Design And Create A Textual Database On Your Microcomputer

Authors: Tenopir, Carol, Lundeen, Gerald

1st Edition

1555700233, 9781555700232

Students also viewed these Databases questions

Question

VRIO Analysis for RHB Bank with justification and example

Answered: 1 week ago