Ask Question
22 July, 09:42

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

+1
Answers (1)
  1. 22 July, 09:51
    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?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers