Write and execute a program to do the following:- 1) Ask the user to input the Class and amount of purchases for 10 customers and store them in the PUR and CLASS lists You can use the following data as initial values:- PUR 50,60,200,90,180,80,100,30,50,60 CLASS A,B,B,A,B,B,A,C,B,A 2) Calculate the amount of discount for each one according to the following table and store it in the new list DISC :- Class Rurahacon Dicgount

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
2 من 4
s.py
Write and execute a program to do the following:-
1) Ask the user to input the Class and amount of purchases for 10 customers and store them
in the PUR and CLASS lists
You can use the following data as initial values:-
PUR
50,60,200,90,180,80,100,30,50,60
CLASS A,B,B.А,В, В. А, С, В.А
2) Calculate the amount of discount for each one according to the following table and store
it in the new list DISC :-
Class
Purchases
Discount
pur s 50
50 < pur S 100
4% of purchases
6% of purchases
8% of purchases
A
100 < pur S 200
200 < pur
pur s 40
40 < pur S 120
120 < pur S 250
3% of purchases
7% of purchases
9% of purchases
B
250 < pur
No Discount
3) Calculate the net paid amount according to the following formula and store them in the
Net paid amount = Amount of purchases - amount of discount
new list NET :-
4) Calculate total amount of purchases , discount and net amount paid.
5) Calculate the maximum ,minimum of purchases , discount and net amount paid.
6) Calculate the total of amount net paid by each class A,B and c.
7) Display the output as follow :-
Customer Serial
Class
Purchases
Discount
Net Paid
2
3
TOTAL
МАX
MIN
Total amount Net Paid BY Class A =
Total amount Net Paid By Class B =
Total amount Net paid By Class C =
Transcribed Image Text:2 من 4 s.py Write and execute a program to do the following:- 1) Ask the user to input the Class and amount of purchases for 10 customers and store them in the PUR and CLASS lists You can use the following data as initial values:- PUR 50,60,200,90,180,80,100,30,50,60 CLASS A,B,B.А,В, В. А, С, В.А 2) Calculate the amount of discount for each one according to the following table and store it in the new list DISC :- Class Purchases Discount pur s 50 50 < pur S 100 4% of purchases 6% of purchases 8% of purchases A 100 < pur S 200 200 < pur pur s 40 40 < pur S 120 120 < pur S 250 3% of purchases 7% of purchases 9% of purchases B 250 < pur No Discount 3) Calculate the net paid amount according to the following formula and store them in the Net paid amount = Amount of purchases - amount of discount new list NET :- 4) Calculate total amount of purchases , discount and net amount paid. 5) Calculate the maximum ,minimum of purchases , discount and net amount paid. 6) Calculate the total of amount net paid by each class A,B and c. 7) Display the output as follow :- Customer Serial Class Purchases Discount Net Paid 2 3 TOTAL МАX MIN Total amount Net Paid BY Class A = Total amount Net Paid By Class B = Total amount Net paid By Class C =
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY