Write a function called compute_pay that accepts arguments representing the hourly wage of an employee and the number of hours that employee worked this week (in that order). the function should return the take home pay owed to the employee as a floating point value rounded to two decimal places. the normal work week is 40 hours, and the company pays employees "time and a half" for overtime. so, the total wages is the sum of regular wages and overtime wages. regular wages are the hours worked (up to 40) times the hourly wage. overtime wages are any hours over 40 times the hourly wage times 1.5. the employee's take home pay is the total wages minus taxes and medical costs. taxes are 20% of the total wages, and medical costs are 10% of the total wages. suppose an employee makes $12.25 per hour and has worked 45 hours this week. the take home pay for that employee is 40 hours times 12.25, plus 5 hours times 18.375 (time-and-a-half), minus taxes and medical, for a total of $407.31.



Answer :

Other Questions