Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

More Books

Students also viewed these Databases questions