Question: Python program: Design and create a program for the ULM Coffee Shop to provide some customer market research data. When a customer places an order,

Python program: Design and create a program for the ULM Coffee Shop to provide some customer market research data. When a customer places an order, a clerk asks for the customers zip code and age. The clerk enters that data as well as the number of items the customer orders. The program operates continuously until the clerk enters a 0 for zip code at the end of the day. When the clerk enters an invalid zip code (more than 5 digits) or an invalid age (defined as less than 5 or more than 105), the program reprompts the clerk continuously until a valid entry is made. When the clerk enters fewer than 1 or more than 12 items, the program reprompts the clerk two more times. If the clerk enters a high value (greater than 12) on the third attempt, the program accepts the high value, but if the clerk enters a negative value on the third attempt, an error message is displayed, and the order is not processed further (not counted and not accumulated). At the end of the program, display a count of the number of items ordered by customers from the same zip code as the coffee shop (71209) and a count from all other zip codes combined. Display the overall average customer age. Additionally, display the total counts of the number of items ordered by customers under 30 and by customers 30 and older.

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!