Question: Python: Dinner List Write an python script to set up invitations to dinner (the name is up to you): 1.Create a list of threepeople (living

Python: Dinner List

Write an python script to set up invitations to dinner (the name is up to you):

1.Create a list of threepeople (living or dead) that you would like to have to dinner at your home. The

list should be created in order of priority. Create two other variables: a location and the date/time (e.g.

Friday November 2nd at 7pm)

2. Use print statement(s) to send an evite message: , youre invited to dinner at

on

. Use indexing and concatenation in your print statements.

3. You find out that the third person on your list cannot make it. Update your list to include a new

dinner guest in the former guests spot in the list. Create a new evite just for the

new guest using a print statement as described in item 2.

4. You just remembered that you have a bigger dinner table such that you can add 3 more guests. You

also remembered that you forgot to evite Dr. Armentrout! So, add him to the list in the highest priority

spot. Then add two more people to the list: one in the position 3 of the list and one at the end of the

list. Print evites (again like part 2) for the all guests.

5. Alas you are missing two chairs from your dining set. You will need to un-evite

two guests. Remove the last two people from your list and print them an apology message: Im sorry , but

you cant come to my house for dinner. (HINT: use .pop ()) Then print your final guest list sorted

in alphabetical order.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!