Unit Wrap-Up Assignment (Not a Deliverable):

Objective: Compute an employee’s total weekly pay by requesting the following inputs: wage, regular hours and overtime hours.

Description: An employee’s total weekly pay equals the hourly wage multiplied by the total number of regular hours plus any overtime pay. Note that overtime pay equals the total overtime hours multiplied by 1.5 times the hourly wage.

  1. Create a New Python File.
  2. Outline the Four Coding Steps with comments.
  3. In the second coding step, define the following three variables:
    • wage
    • regularHours
    • overtimeHours
  4. Prompt the user for input in the following sequence:
    • Enter the wage: $
    • Enter the regular hours:
    • Enter the overtime hours:
  5. Calculate Total Pay:
  • In the third coding step, define a variable named totalPay to calculate the employee’s total weekly pay. This is where you’ll perform the necessary calculations using the variables created in the previous step.
  1. In the fourth coding step, print the employee’s total weekly pay to the terminal.

Solution Example:

  • Enter the wage: $ 20
  • Enter the regular hours: 40
  • Enter the overtime hours: 5
  • The total weekly pay is: $ 950.0