A local small business has hired you to write the payroll


Payroll

A local small business has hired you to write the payroll calculation program. The program only needs to calculate gross pay for an employee and display the results. Your program will accept the employee's name, hours worked, and the employee's pay rate. The program will need to calculate overtime as well. Overtime is defined as anything over 40 hours is paid at 1.5 times the regular pay. The program should print the employee's name, the gross pay amount, and only if there was overtime, print the overtime pay amount as well. Finally, the program should repeat as necessary until the user enters a sentinel value.

Remember to follow the guidelines of good program design. Make sure to use meaningful variable names, include comments as needed, and provide thoughtful output.

Example output:

C:>python week2.py

ABC Inc., Gross Pay Calculator!

Enter employee's name or 0 to quit: Nathan

Enter hours worked: 35

Enter employee's pay rate: 10.00

Employee Name: Nathan

Gross Pay: 350.0

Enter next employee's name or 0 to quit: Toby

Enter hours worked: 45

Enter employee's pay rate: 10

Employee Name: Toby

Gross Pay: 475.0

(overtime pay: 75.0 )

Enter next employee's name or 0 to quit: 0

Exiting program.

Solution Preview :

Prepared by a verified Expert
Business Management: A local small business has hired you to write the payroll
Reference No:- TGS02690700

Now Priced at $20 (50% Discount)

Recommended (98%)

Rated (4.3/5)