Question: For this Python program, you are required to use appropriate variable names (follow the naming conventions). Also make use of comments in your code for
For this Python program, you are required to use appropriate variable names (follow the naming conventions). Also make use of comments in your code for better understanding of the logic.
A program in Python(visual Studio 3) to prompt the user to input their name, employee number, week ending date, hours worked, rate per hour, standard and overtime tax percentage rate. Use the data input to calculate gross pay, tax deductions and net pay. Output the results as a formatted payslip. Assume that a standard working week is 37.5 hours.
E.g. Ask the user to enter the following data:
Employee Name: (sample input - Mark Bate)
Employee Number: (sample input - 123456789A)
Week ending: (sample input - 26/01/2018)
Number of hours worked: (sample input - 42.5)
Hourly Rate: (sample input - 10.50)
Overtime Rate: (time-and-a-half as 1.5)
Standard Tax Rate: (sample input - 20)
Overtime Tax Rate: (sample input - 50)
Output like this is required :
PAYSLIP
WEEK ENDING 26/01/2018
Employee: Mark Bate
Employee Number: 123456789A
Earnings Deductions
Hours Rate Total
Hours (normal) 37.50 10.50 393.75 Tax @ 20% 78.75
Hours (overtime) 5.00 15.75 78.75 Tax @ 50% 39.37
Total pay: 472.50
Total deductions: 118.12
Net pay: 354.38
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
