Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Goals: Concepts related to conditional statements in Python. This is a Python program . You DONT need loops for this. Below is the programming task.

Goals: Concepts related to conditional statements in Python. This is a Python program. You DONT need loops for this.

Below is the programming task.

An employee is paid at a rate of $17.25 per hour for up to 40 regular hours worked in a week. If the employee works more than 40 hours, it is considered overtime. Any hours over 40 hours but less than or equal to 60 are paid at the overtime rate ($12.34 per hour). Any hours over 60 hours but less than equal to 80 hours are paid at the overtime rate ($14.34 per hour). Any hours over 80 hours are paid at the overtime rate ($16.00 per hour).

From the workers gross pay, 14% is withheld for federal income tax, 5% is withheld for state income tax. $80 is withheld to cover the insurance of the worker and 2 dependents. If the worker has more than 2 dependents, then an additional $25 is withheld per dependent for insurance. Write a python program that will read in the name of the employee, number of hours worked in a week and the number of dependents as input. The program should then output the workers name, number of dependents, gross pay, each withholding amount, and the net take-home pay for the week.

Note that the ONLY INPUTS the user provides are

- The employees name.

- The number of hours worked in the week.

- The number of dependents.

Below are four Sample I/O

Net Paycheck Calculator

Employee's Name: John Smith

Number of Hours Worked in a Week: 43

Number of Employee's Dependents: 3

---------------------------------------------------------------------

Employee's name :John Smith

Number of Dependents :3

Hours worked :43

Overtime hours :3

Gross Income :$727.02

State Tax Withheld @ 5% :$36.35

Federal Tax Withheld @ 14% :$101.78

Worker and 2 Dependents' Insurance :$80.00

Additional Dependents' Insurance :$25.00

---------------------------------------------------------------------

Net Take Home Pay :$483.89

Net Paycheck Calculator

Employee's Name: John Smith

Number of Hours Worked in a Week: 63

Number of Employee's Dependents: 0

---------------------------------------------------------------------

Employee's name :John Smith

Number of Dependents :0

Hours worked :63

Overtime hours :23

Gross Income :$979.82

State Tax Withheld @ 5% :$48.99

Federal Tax Withheld @ 14% :$137.17

Worker and 2 Dependents' Insurance :$80.00

Additional Dependents' Insurance :$0.00

---------------------------------------------------------------------

Net Take Home Pay :$713.65

Net Paycheck Calculator

Employee's Name: John Smith

Number of Hours Worked in a Week: 35

Number of Employee's Dependents: 2

---------------------------------------------------------------------

Employee's name :John Smith

Number of Dependents :2

Hours worked :35

Overtime hours :0

Gross Income :$603.75

State Tax Withheld @ 5% :$30.19

Federal Tax Withheld @ 14% :$84.53

Worker and 2 Dependents' Insurance :$80.00

Additional Dependents' Insurance :$0.00

---------------------------------------------------------------------

Net Take Home Pay :$409.04

Net Paycheck Calculator

Employee's Name: John Smith

Number of Hours Worked in a Week: 82

Number of Employee's Dependents: 4

---------------------------------------------------------------------

Employee's name :John Smith

Number of Dependents :4

Hours worked :82

Overtime hours :42

Gross Income :$1255.60

State Tax Withheld @ 5% :$62.78

Federal Tax Withheld @ 14% :$175.78

Worker and 2 Dependents' Insurance :$80.00

Additional Dependents' Insurance :$50.00

---------------------------------------------------------------------

Net Take Home Pay :$887.04

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional IPhone And IPad Database Application Programming

Authors: Patrick Alessi

1st Edition

0470636173, 978-0470636176

Students also viewed these Databases questions

Question

=+j Describe the various support services delivered by IHR.

Answered: 1 week ago