Code in PYTHON
I have a small company. I need a payroll
system that calculates the pay and taxes for
each employee. I have the following input files:
•
EmployeeData
ENum,ELName,EFName,Work Area,HrlyRate
1101,Davis,Mike,7,24.85
1385,Smith,William,1,19.50
1524,White,James,3,23.50
1998,Stuart,Mary,1,25.00
2358,Scott,Richard,4,20.00
2765,Mills,Jason,5,21.00
2945,Schultz,Cindy,7,23.50
4789,Moffett,William,3,30.00
5304,Rangel,Ken,2,28.00
5521,Rodriguez,Teresa,4,29.00
6447,Butler,Craig,2,18.50
6512,Russell,Don,6,26.00
6614,Wilson,Keith,1,28.50
6749,Johnson,Darrell,6,32.00
7325,Butler,Eileen,4,17.00
7886,Williams,Gina,1,21.00
8356,Roberts,Judy,8,23.00
8466,Soto,Glen,8,22.50
9458,Cooper,Lia,4,26.50
9896,Bonds,Lisa,5,27.00
•
TaxTable
LRange,URange,TaxAmt
0.01,200.00,20.00
200.01,400.00,50.00
400.01,600.00,75.00
600.01,800.00,100.00
800.01,1000.00,120.00
1000.01,1200.00,150.00
1200.01,1400.00,180.00
1400.01,1600.00,220.00
1600.01,1800.00,250.00
1800.01,2000.00,300.00
2000.01,2200.00,325.00
2200.01,2500.00,350.00
starting at zero and ending at 2,500.00.
•
TimeCardData
ENum,Day,DailyHours
1101,FRI,8.00
1101,MON,8.00
1101,THU,8.00
1101,TUE,8.00
1101,WED,10.00
1385,FRI,8.00
1385,MON,8.00
1385,THU,8.00
1385,TUE,8.00
1385,WED,8.00
1524,MON,10.00
1524,TUE,10.00
1524,WED,10.00
1998,FRI,8.00
1998,MON,8.00
1998,SAT,4.00
1998,THU,8.00
1998,TUE,8.00
1998,WED,8.00
2358,FRI,10.00
2358,MON,10.00
2358,SAT,4.00
2358,THU,8.00
2358,TUE,8.00
2358,WED,10.00
2765,FRI,8.00
2765,MON,8.00
2765,THU,8.00
2765,TUE,8.00
2765,WED,8.00
2945,FRI,8.00
2945,MON,10.00
2945,SAT,4.00
2945,THU,8.00
2945,TUE,10.00
2945,WED,10.00
4789,FRI,8.00
4789,MON,8.00
4789,THU,8.00
4789,TUE,8.00
4789,WED,8.00
5304,FRI,8.00
5304,MON,12.00
5304,SAT,8.00
5304,THU,8.00
5304,TUE,8.00
5304,WED,10.00
5521,FRI,8.00
5521,MON,8.00
5521,THU,8.00
5521,TUE,8.00
5521,WED,8.00
6447,FRI,8.00
6447,MON,8.00
6447,THU,8.00
6447,TUE,8.00
6447,WED,8.00
6512,FRI,8.00
6512,MON,8.00
6512,THU,8.00
6512,TUE,10.00
6512,WED,10.00
6614,FRI,8.00
6614,MON,8.00
6614,THU,8.00
6614,TUE,8.00
6614,WED,8.00
6749,FRI,10.00
6749,MON,10.00
6749,THU,10.00
6749,TUE,10.00
6749,WED,8.00
7325,FRI,8.00
7325,MON,8.00
7325,THU,8.00
7325,TUE,8.00
7325,WED,8.00
7886,FRI,8.00
7886,MON,8.00
7886,THU,8.00
7886,TUE,8.00
7886,WED,8.00
8356,FRI,8.00
8356,MON,10.00
8356,THU,8.00
8356,TUE,8.00
8356,WED,8.00
8466,FRI,8.00
8466,MON,8.00
8466,THU,8.00
8466,TUE,8.00
8466,WED,8.00
9458,FRI,4.00
9458,MON,10.00
9458,THU,10.00
9458,TUE,10.00
9458,WED,10.00
Employees can also earn overtime
•
If the total hours in a day is more than 8, the
OT rate is 1.5 times their hourly rate .
•
If the total hours in a week is more than 40,
the OT rate is 1.5 times their hourly rate .
After processing, I need an output file called
WeeklyPayroll. There should be one line in the
file for each employee that contains these fields
•
Employee Number
•
Regular Pay (earnings without overtime)
•
OT Pay (overtime earnings)
•
Gross Pay (total pay due)
•
Taxes Due (value from lookup)
•
Net Pay (Gross – Taxes)
PYTHON PROGRAM




OUTPUT:

EXPLANATION:
Proper code comments are given with explanation inside the python code itself.
Code in PYTHON I have a small company. I need a payroll system that calculates the...