Question: Program # 2 : Calculate the weekly pay ( 2 5 pts ) - Create a Python program named test 2 - 2 .
Program #: Calculate the weekly pay pts
Create a Python program named testpy to calculate the weekly pay with or without overtime hours
Your program should have at least one userdefined 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 ifelse... to determine if the hours entered are more than mathbf hours. If that is the case, then multiply any hour beyond by then add it to 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 with overtime hours:
Enter hours worked:
Enter dollars paid per hour:
your overtime hours this week are: hours
Wages for hours at $ per hour are $
Example with No overtime hours:
Enter hours worked:
Enter dollars paid per hour:
you had no overtime hours this week
Wages for hours at $ per hour are $
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
