*Python 3.2 should be used for this*
Write a program that will allow a user to enter working hours and pay rates for employees:
1) The program should prompt the user for three elements of information for each employee:
Last Name
Pay Rate
Hours Worked
2) The program should allow the user to enter as many employees as they wish. Tell you user how to either continue entering data, or to quit.
3) If a person works over 40 hours, those hours are considered over time hours and need to be paid at 1.5 times the pay rate
4) After each entry, display the Name and pay for that employee
5) Keep a running total of regular pay, overtime pay, regular hours and overtime hours – at the end of the program you will need to display the total payroll amounts.
Requirements:
1) Must contain a main function – this function will be responsible for controlling the loop, data entry, displaying the total pay for a particular person and accumulation
2) Must contain a value returning function that returns the regular pay for a person
3) Must contain a value returning function that returns the overtime pay for a person
4) Must contain a separate print function for printing totals
5) Do not use global variables, except the overtime multiplier can be a constant if you wish (the 1.5)
6) All dollar amount should be formatted properly with dollar sign, commas, and two decimal points
7) You should have at least one instance of decision logic (if/then)
Outputs:
While you loop your program should prompt
Enter Last Name: [removed]
Enter Pay Rate: [removed]
Enter Hours: [removed]
(Assume they entered Jones 8.00 43)
Call your functions and then you should display something like this:
Jones: $96.00
Ask if they’d like to enter more or quit
….
Then, once the user quits, you will need to display the totals:
(… this is just an example….)
Total Regular Hours: 765
Total Overtime Hours: 65
Total Regular Pay $76,001.50
Total Overtime Pay $560.71
Extra Credit:
Use loops to validate your data. In other words, do not let someone put in a number that is invalid for payrate and/or hours. You can set your own parameters as long as it is clear to me in your comments what your business rule is.