Question: Note: Use same documentation and design rules as previous assignments. The user will enter employee data using sentinel quit on the name. Read name, number

Note:
Use same documentation and design rules as previous assignments.
The user will enter employee data using sentinel "quit" on the name. Read name, number of
dependents, and hours worked. Use an efficient sentinel-controlled while loop to read, process, and
output earnings. Assume data is valid; no data validation is needed.
All employees earn $18.25 per hour so this value should be set up as a global constant.
The report should look similar to the one shown below with respect to layout in formatted columns.
Gross pay is computed based on hours worked. If the person works less than or equal to 40 hours, the
gross pay is hours time rate. If the person works more than 40 hours, the gross pay is 40 hours paid at
the hourly rate and hours over 40 are paid at "time and a half" which is 1.5 times the hourly rate.
Federal tax is 0.22*(gross pay-dependents *24.32). State tax is 4% of gross pay. Net pay is gross
pay minus taxes.
The report should make columns with f strings and use 2 decimals on monetary anhounts. If the person
worked overtime, the amount of overtime is listed.
Display number of employees awarded overtime and the sum of overtime pay at bottom of the report.
Sample output:
Payroll Report
Enter employee name (quit to end)
Enter number of dependents: 1
Name \lero Hours Gross
Code Specifications:
No global variables are accepted. All variables should be introduced in the function where they are
used and passed to functions via the parameter list. Global constants are acceptable. Infinite while
True: loops are not accepted. Use of break, continue or other jump statements are not accepted.
Functions:
Write the following functions. Do not change the function headings or purpose. Include the comments.
Include the main function at the top of the code
def main ():
This function returns the gross pay.
def computePay (hours):
# return gross pay
This function returns the overtime pay.
def computeOverPay (hours):
# return overtime pay
This function is passed the gross pay and the number of dependents and returns the federal tax.
def federal_tax (gross, dependents) : # return amount of federal tax
This function is passed the gross pay and and returns the state tax.
def state_tax (gross) :
# return amount of state tax
Note: Use same documentation and design rules as

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!