Ask Question
22 April, 01:49

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. 22 April, 02:37
    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 you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers