Question
python 12.1 BoxMart Payroll BoxMart wants a new payroll application to generate pay stubs and pay checks for its employees. The program is to prompt
python
12.1 BoxMart Payroll
BoxMart wants a new payroll application to generate pay stubs and pay checks for its employees. The program is to prompt for the employee name, the hours worked in a week, and a position code. Calculations are as follows:
- Hourly rate is determined by a position code where a cashier is paid $ 12.25/hr, clerk is paid $ 18.00/hr, and manager is paid $ 25.75/hour.
- If the position code is not one of above, then print Invalid code, and exit().
- For everyone except for managers, the hours over 40 in a week are considered to be overtime hours (note normal hours of non-managers can be at most 40).
- Normal pay is normal hours times hourly rate.
- Overtime pay is overtime hours times hourly rate times 1 .
- Gross pay is the sum of normal pay and overtime pay.
- Federal tax is 10% of gross pay in excess of 500.
- State tax is 3% of gross pay.
- Net pay is gross pay less federal tax and less state tax.
- Use start date and end date functions from the pay period module to get the pay period dates. These functions will return a string.
- Use the pay date function from the pay period module to get the date of the check. This function will return a string.
Enter employee name:
John Smith
Enter hours worked:
45
Enter position code:
cashier
BoxMart Pay Stub
Employee Name: John Smith
Pay Period: 01/14/2020 to 01/20/2020
Normal Hours Worked: 40 hrs
Overtime Hours Worked: 5 hrs
Hourly Wage: $ 12.25/hr
Normal Pay: $ 490.00
Overtime Pay: $ 91.88
Gross Pay: $ 581.88
Federal Tax: $ 8.19
State Tax: $ 17.46
Net Pay: $ 556.23
Box Mart, Inc. 01/27/2020
Pay to: John Smith $ 556.23
Bonus 5 points
When printing the pay check, print on the next line text of the amount of the pay check.
For example:
Box Mart, Inc. 01/27/2020
Pay to: John Smith $ 556.23
Five Hundred Fifty Six and 0.23
Make sure to print Eleven, Twelve, Thirteen as appropriate when the tens column is a 1
.
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