+1

Lists Challenge! Please don't post answers. A healthy discussion is welcome.

Make a list that includes at least three people you’d like to invite to dinner. Then use your list to print a message to each person, inviting them to dinner. Add a print statement at the end of your program stating the name of the guest who can’t make it. • Modify your list, replacing the name of the guest who can’t make it with the name of the new person you are inviting. • Print a second set of invitation messages, one for each person who is still in your list. Add a print statement to the end of your program informing people that you found a bigger dinner table. • Use insert() to add one new guest to the beginning of your list. • Use insert() to add one new guest to the middle of your list. • Use append() to add one new guest to the end of your list. • Print a new set of invitation messages, one for each person in your list Add a new line that prints a message saying that you can invite only two people for dinner.

9/5/2019 1:23:41 PM

Subham

4 Answers

New Answer

+2

This is not the place for it (programming-related questions only). Please use the dedicated thread and post it there (read the rules first)! https://www.sololearn.com/Discuss/1270852/?ref=app

+1

Ok, like the one we post under activity area !!!! HonFu

0

Use pop() to remove guests from your list one at a time until only two names remain in your list. Each time you pop a name from your list, print a message to that person letting them know you’re sorry you can’t invite them to dinner. • Print a message to each of the two people still on your list, letting them know they’re still invited. • Use del to remove the last two names from your list, so you have an empty list. Print your list to make sure you actually have an empty list at the end of your program.

0

Please check HonFu