Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PS. (20 points) Write a Python function for computing an employee's pay based on the following description. The employee's weekly pay is based on her
PS. (20 points) Write a Python function for computing an employee's pay based on the following description. The employee's weekly pay is based on her category, which is either Category 1: Salary OR Category 2: Hourly For the hourly category, there are two subcategories, regular hours & overtime: . Regular hours are 40, and they have their own rate. . Overtime hours have an overtime rate. Write a function that takes as input the category, which can only be "salary" or "houry, and the number of worked hours, and it prints out the employee pay. Use these variables inside your function: hourlyRate 15 overtimeRate: 20 salaryRate 500 Paragraph t your code using these two cases: e 1: gory "salary" 2: gory = "hourly" and hours = 44 is, run case 1, by setting category "salary" and get a print of the 'pay, then run case 2 and of the 'pay. on Hint: For case 1, you will simply output the salary rate given above. For case 2, you will urly rate for the first 40 hours, and then you will consider the overtime rate for the rema
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started