Question
Problem Statement (Python) You have been asked to write a program for a retail store that will allow them to calculate discounts for their employees
Problem Statement (Python)
You have been asked to write a program for a retail store that will allow them to calculate discounts for their employees when they buy items. Discounts are based on number of years worked as well as if the employee is a manager or hourly employee. They are also allowed no discount once they have received $200 in discounts for the year.
Note: Once you complete the discount for the employee, a question should be asked as to if there is another employee. If there is, collect the input and process the data for the next employee as such. Do this until the user answers NO for Another Employee. Once all employees have been processed, display the All Employee Summary and end the program.
INPUT
The application must be able to collect the following required information for each employee:
- Number of years employed (required, numeric, >0)
- Total amount of previous purchases before discount (required, numeric, >=0)
- Employee status (employee or manager)
- Total of todays purchase (required, numeric, >=0)
OUTPUT
There are two distinct areas required for output:
- For each employee display the following:
- Employee discount percentage
- YTD Amount of discount in dollars
- Total purchase today before discount
- Employee discount this purchase
- Total with discount
- (All Employee Summary) Calculate the total for all employees for todays date:
- Total before discount for the day
- Total after discounts applied
PROCESS
Employee discount standard
Years of Employment | Management | Hourly |
1-3 Years | 20% | 10% |
4-6 Years | 24% | 14% |
7-10 Years | 30% | 20% |
11-15 Years | 35% | 25% |
More than 15 Years | 40% | 30% |
YTD discount in dollars = total purchase before today * discount
Employee discount this purchase:
The discount for the purchased is based on the YTD discounts already realized. Meaning, an employee or manager only receives $200 in discount for the year.
Therefore:
- If an employee has already accumulated $200 in discounts prior to the current purchasethen no discount for this purchase.
- If the (Total of the YTD Discount + Current Discount) < 200..then the current purchase receives the whole discount.
- If the (Total of the YTD Discount + Current Discount) > 200..then the current purchase receives the only a partial discount up to the 200 dollar YTD max.
Total with discount: Total * discount allowed
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