Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 $ they get a $ gift card.
If a customer is in her loyalty program AND they buy over $ they get a $ gift card.
If a customer is not in her loyalty program but they buy over $ they get a $ gift card.
Note: Some customers arent eligible for a gift card. The program should indicate that.
With every purchase, Trish also must charge 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 LabPpy 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 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:
Is the customer a loyalty program member yn: n
Sales tax: $
Total after tax: $
Gift Card Awarded: $
Enter the total purchase amount:
Is the customer a loyalty program member yn: y
Sales tax: $
Total after tax: $
Gift Card Awarded: $
Enter the total purchase amount:
Is the customer a loyalty program member yn: n
Sales tax: $
Total after tax: $
Gift Card Awarded: $
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 LabPouput.jpg
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started