Question
This is MIS content (utilizing Python/Spyder) Product Summary gBooks, a subsidiary of Grapefruit Company, sells audiobooks. They have developed a program to incent customers to
This is MIS content (utilizing Python/Spyder)
Product Summary
gBooks, a subsidiary of Grapefruit Company, sells audiobooks. They have developed a program to incent customers to purchase many books at a time to increase sales. They have also created a membership program to provide even better deals for their best customers. Write a Python program that accepts information from the user (customer), calculates the price of the books sold, and displays a receipt of this information to the customer. You should assume that the tax rate is 8.25%.
Audiobooks Business Rules
Membership Program
Customers may enroll in the membership program for a fee of $4.95 (fee is not taxed). Customers who enroll are considered premium customers and receive better prices and discounts. Customers who do not enroll in the program do not pay a membership fee and are considered regular customers. NOTE: Customers are only charged the membership fee when they upgrade from Regular to Premium during the transaction. Customers who have already paid their premium membership fee do not have to pay each time they purchase books.
Bulk Purchasing Incentives
Customers may receive up to two books for free with every transaction. The number of free books received depends on both the number of books purchased and whether the customer has enrolled in the membership program. The books received for fee are in addition to the books purchased (e.g. A customer purchases 9 books, and got 1 for free, so the customer receives 10 total books).
Summary:
See below for a summary of the different customer types, the prices paid for membership and per book, as well as the bulk purchasing incentives:
Customer Type | Price of Each Book | Books free with Purchase | |
Regular | $9.95 | < 8 books | 0 free books |
8 to 12 books | 1 free book | ||
>12 books | 2 free books | ||
| |||
Premium | $8.49 | <6 books | 0 free books |
6 to 9 books | 1 free book | ||
>9 books | 2 free books |
Inputs
Your program should prompt the user (customer) to enter the following information:
Customer name
Number of books purchased
Membership Type (R or r for Regular; P or p for Premium)
If the user is not a premium member, ask them if they want to purchase a membership and print a message based on their response. If they upgrade, and additional line should appear with the fee. If they do not upgrade, do not display a line for membership fee. Customers who are already premium members should not be asked to upgrade and no membership fee should be displayed. (Do not display a membership fee of $0).
OUTPUTS
Your program should output the following information:
Customers name
Type of customer (Regular or Premium not R/r or P/p)
Total number of books received
Price of books before sales tax
Sales tax
Total amount due
Other Program Details
Your program must contain a program header (see class slides for specifics)
Your program must have good, relevant variable names
Your program should be commented throughout
Your program should prompt the user for all information before displaying the product summary
For now, you can assume that the user will enter a valid number for number of books purchased and that they will enter P/p or R/r for the membership type.
You MUST store any calculations in variables (i.e. do not calculate the total books, sales tax, or total amount due directly in your print statements).
You will be penalized for having the same code twice if it can be avoided. Perform calculations only once where possible. (Hint: put your totals calculations outside of if statements)
You may perform the tasks in any order as long as your output follows the order of the output specified above.
Your program should print a blank line after gathering the information from the user and before displaying the summary information.
Any printed dollar values should be preceded by a $ and be formatted with two decimal places.
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