Question: Write a Python program (payroll.py) that does the following: Print a message that says Welcome to the Payroll Manager! Define a function (payroll_calculator) that has
Write a Python program (payroll.py) that does the following: Print a message that says "Welcome to the Payroll Manager!" Define a function (payroll_calculator) that has the following three parameters: employee name, hours worked that week, and pay rate in dollars per hour. . In the payroll_calculator, calculate the employee's salary as the number of hours worked multiplied by the rate. If the employee has worked more than 40 hours, then calculate overtime as 1.5 times the regular pay rate and add that to the salary. When the total salary has been calculated, print the name, hours worked and the salary in one line. Define the main function that contains five calls to the payroll_ calculator function with various names, hours worked, and pay rates. Make sure to call the main0 function in your program. . Make sure to test your program such that it works with different pay rates and hours worked. Note. This program has NO user input
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
