Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python Add tag Exercise# 2: A supermarket awards coupons depending on how much a customer spends on groceries. For example, if you spend $50, you

image text in transcribed

python

Add tag Exercise# 2: A supermarket awards coupons depending on how much a customer spends on groceries. For example, if you spend $50, you will get a coupon worth eight percent of that amount. The following table shows the percent used to calculate the coupon awarded for different amounts spent. Write a program that calculates and prints the value of the coupon a person can receive based on groceries purchased. A sample run is as follows: Sample Run Sample Run Please enter the cost of your groceries: 200 Please enter the cost of your groceries: 7 You win a discount coupon of $24.00. (12% of your purchase) You win a discount coupon of $0.00 (0% of your purchase) Marks: 4 Add tag Please enter the cost of your groceries: 14 You win a discount coupon of $ 1.12. (8% of your purchase) Money Spent Coupon Percentage Less than $10 No coupon From $10 to $60 8% More than $60 to $150 10% More than $150 to $210 12% More than $210 14% Add tag In [ ]: # insert code

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_2

Step: 3

blur-text-image_3

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

Beginning Microsoft SQL Server 2012 Programming

Authors: Paul Atkinson, Robert Vieira

1st Edition

1118102282, 9781118102282

More Books

Students also viewed these Databases questions

Question

=+Have you changed your name?

Answered: 1 week ago

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago