Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SupremeZ is a superstore that sells different items to its customers. When customers buy from the store then they are given a receipt/invoice. Create a

SupremeZ is a superstore that sells different items to its customers. When customers buy from the store then they are given a receipt/invoice. Create a program in python that will calculate the total amount for an invoice. At first the program will ask how many products are there in the invoice. Then the program will take input of product price and quantity for each product in the invoice. As the items are entered, the program calculates the total of the invoice. If the calculated total is greater than $50 then the customer gets a 5% discount on the total. At the end, the program outputs

  1. The total for the invoice
  2. If the invoice is eligible for a discount, then it shows the discounted total
  3. It applies 13% HST on the total/ discounted total
  4. It displays the total payable

Sample execution- Case1:

How many products: 3

Price: 5

Quantity: 3

Price: 8

Quantity:1

Price: 10

Quantity:1

Total for the invoice is: $33

HST (13%): $4.29

Total payable: $37.29

Sample execution- Case2:

How many products: 2

Price: 15

Quantity: 3

Price: 10

Quantity:1

Total for the invoice: $55

Promo (total>50) applied: $52.25

HST (13%): $6.7925

Total payable: $59.0425

You have saved: $2.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

Readings In Database Systems

Authors: Michael Stonebraker

2nd Edition

0934613656, 9780934613651

More Books

Students also viewed these Databases questions

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago