Python Forum
Fun Task: Python 3.7.2
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fun Task: Python 3.7.2
#1
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/1bw6N...9uOuFYf0kg)

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
Reply
#2
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).
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  simple task in python Rapito 4 2,095 Nov-22-2021, 10:09 PM
Last Post: jefsummers
  small newbie task to python intoxicated_dk 2 2,323 Jun-17-2019, 01:57 PM
Last Post: intoxicated_dk
  file python task, need help ! rayabv 7 3,408 Apr-15-2019, 10:07 PM
Last Post: Yoriz
  School python program task help TommyLee 3 3,951 Apr-17-2018, 04:44 AM
Last Post: tannishpage

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020