Develop a program to calculate a purchase discount for The price will be determined based on the total purchase and the discount percentage. The detail of the discount as folows: special purchase event. total purchase >=RM1000 025% discount total purchase >=RM500, and =RM300, and =RM100, and =RM80, and

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
100%
Python program
Develop a program to calculate a purchase discount for
The price will be determined based on the total purchase and the discount percentage.
The detail of the discount as folows:
special purchase event.
How much of your total purchase: RM1897
Your purchase detail:
Your total purchase: RM 1897
Discount:
Price after discount: RM 1422.7s
total purchase >=RM1000 025% discount
total purchase >=RM500, and <RM1000 020% discount
total purchase >=RM300, and <RM500 015% discount
total purchase >=RM100, and <RM300 010% discount
total purchase >=RM80, and <RMI00 05% discount
25 +
Do you want to continue? [yes-1, no-0):1
How much of your total purchase: RMS4
Your purchase detail:
Using suitable operation, repetitive and function technique, build at least 2 functions
excluding the main tunction to make the program easy to be maintained.
Your total purchase: RM 54
Discount:
Price after discount: RM 54
Do you want to continue? [yes-1, no-0):0
The output sample:
Thank you, happy purchase!!
Transcribed Image Text:Develop a program to calculate a purchase discount for The price will be determined based on the total purchase and the discount percentage. The detail of the discount as folows: special purchase event. How much of your total purchase: RM1897 Your purchase detail: Your total purchase: RM 1897 Discount: Price after discount: RM 1422.7s total purchase >=RM1000 025% discount total purchase >=RM500, and <RM1000 020% discount total purchase >=RM300, and <RM500 015% discount total purchase >=RM100, and <RM300 010% discount total purchase >=RM80, and <RMI00 05% discount 25 + Do you want to continue? [yes-1, no-0):1 How much of your total purchase: RMS4 Your purchase detail: Using suitable operation, repetitive and function technique, build at least 2 functions excluding the main tunction to make the program easy to be maintained. Your total purchase: RM 54 Discount: Price after discount: RM 54 Do you want to continue? [yes-1, no-0):0 The output sample: Thank you, happy purchase!!
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

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