Write a program that reads in the following information and prints a payroll statement:
Print your money amounts with a dollar sign and two decimal places after the decimal point. Non-money amounts should print with one decimal place after the decimal point. Print a blank line before the input lines and output lines, as shown in the example below.
A sample run is shown below. This run is from the command line; yours can run under IDLE or another IDE. However, the TA should be able to run your program file at the command level. Your output should be exactly like this for these input data. There is a single space after each colon.
> python3 Payroll.py Enter employee's name: Smith Enter number of hours worked in a week: 10 Enter hourly pay rate: 9.75 Enter federal tax withholding rate: 0.20 Enter state tax withholding rate: 0.09 Employee Name: Smith Hours Worked: 10.0 Pay Rate: $9.75 Gross Pay: $97.50 Deductions: Federal Withholding (20.0%): $19.50 State Withholding (9.0%): $8.78 Total Deduction: $28.27 Net Pay: $69.22Note that the state withholding amount listed in the book differs by 1 cent. This is probably due to a rounding difference in the two versions. Either is fine. Note also that the book version does not display two digits after the decimal point in all cases of monetary amounts; your program should, even if the trailing digit is a zero.
Your file must compile and run before submission. It must also contain a header with the following format:
# File: Payroll.py # Student: # UT EID: # Course Name: CS303E # # Date Created: # Date Last Modified: # Description of Program:
If you submit multiple times to Canvas, it will rename your file name to something like Payroll-1.py, Payroll-2.py, etc. Don't worry about that; we'll grade the latest version.