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:
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
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
Get step-by-step solutions from verified subject matter experts
