0% found this document useful (0 votes)
4 views2 pages

Python Question 1

The document outlines the requirements for a shopping program that calculates the total cost of a customer's order based on item prices and quantities. It specifies discount conditions based on total quantity and cost, as well as categorizing the final cost into 'Regular', 'Premium', or 'VIP'. Additionally, it includes tasks for creating a flowchart and writing pseudocode to represent the process.

Uploaded by

goslinfredoxger
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Python Question 1

The document outlines the requirements for a shopping program that calculates the total cost of a customer's order based on item prices and quantities. It specifies discount conditions based on total quantity and cost, as well as categorizing the final cost into 'Regular', 'Premium', or 'VIP'. Additionally, it includes tasks for creating a flowchart and writing pseudocode to represent the process.

Uploaded by

goslinfredoxger
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

A shopping program is needed to calculate the total cost of a customer’s

order. The program should:

1. Ask the user to enter the number of items they want to purchase.

2. For each item, ask the user to enter:

The item price.

The quantity they wish to buy.

3. If the total quantity exceeds 10 items, apply a 10% discount to the


total cost.

4. If the total cost exceeds 1000, apply an additional 5% discount to the


total cost.

5. Display the total cost after discounts, and categorize the customer’s
purchase as follows:

“Regular” if the final cost is below 500.

“Premium” if the final cost is between 500 and 1000.


“VIP” if the final cost is above 1000.

Requirements:

Ensure input validation for item price and quantity (prices should be non-
negative, and quantities should be at least 1).

Calculate the total cost, apply applicable discounts, and determine the
category.

Tasks:

(a) Draw a flowchart to show this process.

(b) Write the pseudocode to represent this process.

You might also like