Question: Overview of A Dinner Party Program (Python) Put a program that will prompt a couple for guest and menu information and then prompt the guests

Overview of A Dinner Party Program (Python) Put a program that will prompt a couple for guest and menu information and then prompt the guests for their menu choices. Guests will only be able to choose their entree, dessert, and drink. Other items on the dinner menu will be the same for all guests. The following is an example run of this program: Enter the number of guests attending: 3

Enter the number of entree choices: 3

Enter the number of dessert choices: 3

Enter the number of drink choices: 4

Entrees

Enter an entree option: Planked salmon

Enter an entree option: Prime rib

Enter an entree option: Sesame tofu with spinach

Desserts

Enter a dessert option: Caramel oat bar

Enter a dessert option: Chocolate decadence

Enter a dessert option: Orange creme brulee Drinks

Enter a drink option: Lemonade

Enter a drink option: Tea

Enter a drink option: Coffee

Enter a drink option: Milk Guest #1:

Please select the number of your entree choice.

1) Planked salmon, 2) Prime rib, 3) Sesame tofu with spinach: 3

Please select the number of your dessert choice.

1) Caramel oat bar, 2) Chocolate decadence, 3) Orange creme brulee: 1 Please select the number of your drink choice.

1) Lemonade, 2) Tea, 3) Coffee, 4) Milk: 2 Guest #2:

Please select the number of your entree choice.

1) Planked salmon, 2) Prime rib, 3) Sesame tofu with spinach: 3 Please select the number of your dessert choice.

1) Caramel oat bar, 2) Chocolate decadence, 3) Orange creme brulee: 3 Please select the number of your drink choice. 1) Lemonade, 2) Tea, 3) Coffee, 4) Milk: 4 Guest #3:

Please select the number of your entree choice.

1) Planked salmon, 2) Prime rib, 3) Sesame tofu with spinach: 1 Please select the number of your dessert choice.

1) Caramel oat bar, 2) Chocolate decadence, 3) Orange creme brulee: 2 Please select the number of your drink choice. 50 1) Lemonade, 2) Tea, 3) Coffee, 4) Milk: 2 ***DINNER PARTY ORDERS ***

The entree orders are as follows:

Planked salmon: 1

Prime rib: 0

Sesame tofu with spinach: 2

The dessert orders are as follows:

Caramel oat bar: 1

Chocolate decadence: 1

Orange creme brulee: 1

The drinks orders are as follows:

Lemonade: 0

Tea: 2

Coffee: 0

Milk: 1 The trick in producing the program to create the output above is, of course, to divide it into functions that will handle the different tasks. Altogether it requires 5 functions as follows: selection(): Takes two formal parameters, a string prompt and an integer. Returns a list. The elements of the list will actually be two-element lists. Youll actually call this function three different times in main(), rst to prompt the couple for their entree options, next to prompt them for their dessert options, and nally to prompt them for their drink options. menu(): Takes one formal parameter, one of the three different lists that were generated by selection(), and returns a string prompt with the menu choices. This function will actually be called 3 * (number of guests) times. choose(): Takes one formal parameter, one of the three different lists that were generated by selection(). This function calls menu() and tallies the choices for each guest. It will also be called 3 * (number of guests) times. report(): Takes three formal parameters, the three lists rst generated by selection() and is then used to tally the choices made by the guests. main(): Takes no formal parameters. This function prompts the happy couple for the number of guests, prints some messages to the screen, creates three different string prompts, 5 calls selection() three times, and then for each guest calls choose() three times. Finally, it calls report() to print out the totals for each choice.

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!