Question: Program # 2 : Calculate the weekly pay ( 2 5 pts ) - Create a Python program named test 2 - 2 .

Program \#2: Calculate the weekly pay (25 pts)
- Create a Python program named test2-2.py to calculate the weekly pay with or without overtime hours
- Your program should have at least one user-defined function to calculate Weekly Wages after accepting as the total Hours and hourly Wage and return total pay
- Your program will accept total hours worked in one week
- Then it will Calculate the weekly pay with or without overtime hours
- Use conditional statements (if...else...) to determine if the hours entered are more than \(\mathbf{40}\) hours. If that is the case, then multiply any hour beyond 40 by 1.5 then add it to 40 hours then multiply it by the hourly wage to come up with the total pay.
- Display a message if they have worked overtime hours or if they did not have any overtime hours (see the example of output (for both cases)
Example 1 with 5 overtime hours:
Enter hours worked: 45
Enter dollars paid per hour: 15
your overtime hours this week are: 5.0 hours
Wages for 45.0 hours at \(\$ 15.00\) per hour are \(\$ 712.50\).
Example 2 with No overtime hours:
Enter hours worked: 39
Enter dollars paid per hour: 15
you had no overtime hours this week
Wages for 39.0 hours at \(\$ 15.00\) per hour are \(\$ 585.00\).
Program \ # 2 : Calculate the weekly pay ( 2 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!