Question: Create a program in Python that prompts the user for product price and quantity, and continues until the user enters N when asked to continue.

Create a program in Python that prompts the user for product price and quantity, and continues until the user enters N when asked to continue. Store the inputs (price and quantity) in separate lists. Once the user has entered N, calculate the grand total, print the grand total, then print the item number as well as the subtotal for each item. The quantity will always be a whole number. Use appropriate data types for the lists. Sample run: Add to order (Y/N): Y Enter Price: 52.25 Enter Quantity: 4 Add to order (Y/N): Y Enter Price: 21.85 Enter Quantity: 5 Add to order (Y/N): Y Enter Price: 1.25 Enter Quantity: 55 Add to order (Y/N): N Grand Total: $387.00 Item 1 subtotal: $209.00 Item 2 subtotal: $109.25 Item 3 subtotal: $68.75

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!