Question: Create a Python program that computes the total grocery cost of all the Uber customers. Your program should work for any number of customers. Your

Create a Python program that computes the total grocery cost of all the Uber customers. Your program should work for any number of customers. Your code only needs to include a list of four customer names. You decide on the names. Each customer can select from a menu of five grocery items.

In the main program, use a FOR loop to iterate thru the list of names. (I should be able to substitute your list of four names with my list of 30 names). Within the loop call a function that has the customer name as an argument.

The function displays a list of 5 grocery items with prices. And prompts the user how many of each item to purchase. Validate the user input (should be greater, equal to 0). Validation of each input should re-prompt within a loop. No breaks. Then computes the total grocery bill and displays the customer's name and total grocery bill. Then returns the total grocery bill for that customer. In the main, accumulate the total of all customers grocery bills. Displays the total grocery bills and calculates the Ubers commission (percentage of the total bill) and displays that as well.

Display your name,class,date as per SubmissionRequirements by using a function. NOTE: No arrays we havent learned that yet. This assignment is about loops. If you have arrays, it wil be an unfulfilled requirement! Your program should include Header comments (what the program does) and in-line comments (the major design steps). Document the values you chose for the student name list as well.

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!