Question: computer programming PROBLEM 3 Trish at Bargain Swap Shop has decided to add a gift card program for her loyal customers and for customers that

computer programming PROBLEM 3
Trish at Bargain Swap Shop has decided to add a gift card program for her loyal customers and for customers that buy a lot. Here's how it works:
If a customer is in her loyalty program and they buy $50-100, they get a $15 gift card.
If a customer is in her loyalty program AND they buy over $100, they get a $25 gift card.
If a customer is not in her loyalty program but they buy over $100, they get a $5 gift card.
Note: Some customers arent eligible for a gift card. The program should indicate that.
With every purchase, Trish also must charge 6.5% sales tax on the total. The gift card is NOT included in the total and is not considered when calculating the tax.
Create a file named Lab02P3.py. Write a program that calculates the cost for the total purchase:
Ask the user to enter the total purchase amount. NOTE: This number could be a floating point number.
Ask the user if the customer is in the loyalty program (see sample output).
Calculate the amount of sales tax on the total.
Calculate the total with tax.
Output the sales tax and the total with tax. The program should format all money amounts that are output with 2 digits after the decimal point.
Announce to the user if the customer receives a gift card, and what amount of gift card they receive.
Sample Outputs:
Enter the total purchase amount: 120
Is the customer a loyalty program member (y/n): n
Sales tax: $7.80
Total after tax: $127.80
Gift Card Awarded: $5
Enter the total purchase amount: 95.45
Is the customer a loyalty program member (y/n): y
Sales tax: $6.20
Total after tax: $101.65
Gift Card Awarded: $15
Enter the total purchase amount: 65
Is the customer a loyalty program member (y/n): n
Sales tax: $4.23
Total after tax: $69.23
Gift Card Awarded: $0
Run this program using the PyCharm Terminal. Take a screenshot of the Terminal that includes the line showing where you started the program run with the results. Name the screenshot Lab02P3-ouput.jpg.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!