Write a Python program to calculate the gross pay for some employees as shown in the following run samples. Any hours worked over 30 are paid at time and a half (1.5 times the regular hourly rate) Run sample 1: Enter the number of employees: 2 Enter the hours worked by employee 1: 32 Enter the hours worked by employee 2: 20 Enter the hourly pay rate: 10 Gross pay for employee 1 with 2.0 hours overtime : $330.00 Gross pay for employee 2: $200.00 Run sample 2: Enter the number of employees: 3 Enter the hours worked by employee 1: 30 Enter the hours worked by employee 2: 20 Enter the hours worked by employee 3: 10 Enter the hourly pay rate: 10 Gross pay for employee 1: $300.00 Gross pay for employee 2: $200.00 Gross pay for employee 3: $100.00
Write a Python program to calculate the gross pay for some employees as shown in the following run samples. Any hours worked over 30 are paid at time and a half (1.5 times the regular hourly rate)
Run sample 1:
Enter the number of employees: 2
Enter the hours worked by employee 1: 32
Enter the hours worked by employee 2: 20
Enter the hourly pay rate: 10
Gross pay for employee 1 with 2.0 hours overtime : $330.00
Gross pay for employee 2: $200.00
Run sample 2:
Enter the number of employees: 3
Enter the hours worked by employee 1: 30
Enter the hours worked by employee 2: 20
Enter the hours worked by employee 3: 10
Enter the hourly pay rate: 10
Gross pay for employee 1: $300.00
Gross pay for employee 2: $200.00
Gross pay for employee 3: $100.00
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images