Python Forum
Fun Task: Python 3.7.2 - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Homework (https://python-forum.io/forum-9.html)
+--- Thread: Fun Task: Python 3.7.2 (/thread-18234.html)



Fun Task: Python 3.7.2 - CozyDarkness - May-10-2019

Create a script that reads in the attached emp.txt file and outputs a file with the net pay of each employee. Incorporate the overtime and net pay rules from the previous assignments. Also, create a separate file which states the employee with the highest net pay and the employee with the lowest net pay.

Emp.text file (https://docs.google.com/document/d/1bw6N2jU1fjfwum-g_VvZKtLGwI4UtMXd39uOuFYf0kg)

The structure of emp.txt is the following:

employee_id, hourly_rate, hours_worked, years_of_service



Overtime rules:

To earn overtime the employee must have worked for the company for at least 2 years AND must have worked over 40 hours

If the employee worked over 50 hours they receive an additional 50 to be added to grossPay

If the employee has worked over 40 hours but has not worked for the company for at least 2 years they do not receive overtime.

Use the following formula to determine how much overtime the user worked
overtime = <hours worked> - 40

Calculate the gross pay with the following formula
grossPay = (overtime * <hourly rate> * 2) + ((<hours worked> - overtime) * <hourly rate>)



Net Pay rules:

subtract 39% from gross pay


RE: Fun Task: Python 3.7.2 - buran - May-10-2019

Just posting your homework assignment even as "fun task" will yield nothing and is never well accepted.
We are always glad to help, but we are not going to do your [home]work for you.
Post your code in python tags and full traceback if you get any errors - in error tags and ask specific question(s).