Ask Question
19 June, 11:10

An employee's total weekly pay equals the hourly wage multiplied by the total number of regular hours plus any overtime pay. Overtime pay equals the total overtime hours multiplied by 1.5 times the hourly wage. Write a program that takes as inputs the hourly wage, total regular hours, and total overtime hours and displays an employee's total weekly pay

+2
Answers (1)
  1. 19 June, 12:56
    0
    Let's do this in python 3. We can calculate the pay for the regular hours and the pay for overtime hours, then sum them up.

    def weekly_pay (hourly_wage, total_regular_hours, total_overtime_hours):

    regular_hours_pay = hourly_wage*total_regular_hours

    overtime_hours_pay = 1.5*hourly_wage*total_overtime_hours

    return regular_hours_pay + overtime_hours_pay
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “An employee's total weekly pay equals the hourly wage multiplied by the total number of regular hours plus any overtime pay. Overtime pay ...” in 📙 Engineering if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers