Hey guys and gals I am really struggling with this program. I have been working on it for about a week now and every time I think I am getting somewhere it seems like it flops and I get frustrated and start over. I would appreciate it if anyone could help me out. I think I need to start with some function but not really sure. We learned about functions last week and I just don't get it. So again any help would be greatly appreciated.
Create a Python program that meets the following requirements:
• Ask the user to enter payroll information for the company. Set up a loop that continues to ask for information until they enter “DONE”. For each employee ask three questions:
name (first & last)
hours worked this week (only allow 1 through 60)
hourly wage (only allow 6.00 through 20.00)
VALIDATE the hours worked and the hourly wage, and make sure a name is entered.
• Calculate each employee’s pay, and write it out to a sequential file. Be sure to include file I/O error handling logic.
Include only the weekly pay
Weekly pay is calculated:
For (1-40 hours) it is hourly rate * hours worked
For (41-60 hours) it is (hours worked – 40) * (hourly rate * 1.5)
+ hourly rate * 40
• After all the employees are entered, read in the sequential file into a list named PAY for the weekly pay of each employee. Sort the list. Now print the lowest, highest, and average weekly pay for the week.