Write a program paycheck.py
that calculates an employee's wages.
Have the main()
program find out how many hours an employee worked that week and what their hourly wage is. Those two values should be sent as parameters to a function calculate_wages()
that calculates how much money the employee has earned according to the following system: The number of hours worked up to and including 40 hours is paid at the regular hourly wage, while any overtime work (over 40 hours per week) is paid at 150 percent of the regular wage. The function should return the wages the employee has earned to the main program which prints out the result.
Sample interactions:
What is your hourly wage in dollars / hour? 20
How many hours did you work this week? 19
Your pay is $380.
What is your hourly wage in dollars / hour? 20
How many hours did you work this week? 41
Your pay is $830.