Description of program: Overtime Pay Federal law requires that hourly employees be paid "time-and-a- half" for work in excess of 40 hours in a week. For example, if a person's hourly wage is $12 and he or she works 60 hours in a week, the person's gross pay should be: (40 * hourlyWage) + (1.5* hourlyWage* (totalHours Worked - 40)) = $840. If the user worked over 40 hours, you need to display how much additional pay they earned. Possible outcome: Enter hourly wage: [Allow user to enter hourly wage] Enter total hours worked: [Allow user to enter total hours worked] Gross pay for the week: [Gross pay calculated] Conditional Outputs: If the user earned overtime: You received $[amount earned] in overtime pay. If the user didn't earn overtime: You did not earn any overtime pay this period. Example Data and Output: With overtime: Enter hourly wage: 12 Enter total hours worked: 60 Gross pay for the week: $840.0 You received 360.0 in overtime pay. Without overtime: Enter hourly wage: 12 Enter total hours worked: 40 Gross pay for the week: $480.0 You did not earn any overtime pay period.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

Code is in Python

Description of program:
Overtime Pay Federal law requires that hourly employees be paid "time-and-a-
half" for work in excess of 40 hours in a week. For example, if a person's hourly
wage is $12 and he or she works 60 hours in a week, the person's gross pay
should be:
(40 *hourly Wage) + (1.5* hourlyWage* (totalHours Worked - 40)) = $840.
If the user worked over 40 hours, you need to display how much additional pay
they earned.
Possible outcome:
Enter hourly wage: [Allow user to enter hourly wage]
Enter total hours worked: [Allow user to enter total hours worked]
Gross pay for the week: [Gross pay calculated]
Conditional Outputs:
If the user earned overtime:
You received $[amount earned] in overtime pay.
If the user didn't earn overtime:
You did not earn any overtime pay this period.
Example Data and Output:
With overtime:
Enter hourly wage: 12
Enter total hours worked: 60
Gross pay for the week: $840.0
You received 360.0 in overtime pay.
Without overtime:
Enter hourly wage: 12
Enter total hours worked: 40
Gross pay for the week: $480.0
You did not earn any overtime pay period.
Transcribed Image Text:Description of program: Overtime Pay Federal law requires that hourly employees be paid "time-and-a- half" for work in excess of 40 hours in a week. For example, if a person's hourly wage is $12 and he or she works 60 hours in a week, the person's gross pay should be: (40 *hourly Wage) + (1.5* hourlyWage* (totalHours Worked - 40)) = $840. If the user worked over 40 hours, you need to display how much additional pay they earned. Possible outcome: Enter hourly wage: [Allow user to enter hourly wage] Enter total hours worked: [Allow user to enter total hours worked] Gross pay for the week: [Gross pay calculated] Conditional Outputs: If the user earned overtime: You received $[amount earned] in overtime pay. If the user didn't earn overtime: You did not earn any overtime pay this period. Example Data and Output: With overtime: Enter hourly wage: 12 Enter total hours worked: 60 Gross pay for the week: $840.0 You received 360.0 in overtime pay. Without overtime: Enter hourly wage: 12 Enter total hours worked: 40 Gross pay for the week: $480.0 You did not earn any overtime pay period.
Expert Solution
Step 1

Federal Low

In a federalist political system, two stages of government share jurisdiction over the same region. Typically, a bigger geographical area's overall governance is the responsibility of a government, while local concerns are handled by states, cities, as well as other smaller subdivisions.

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

How do i add the print("You did earn any overtime pay period.") when workingunder 40 hours?

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education