Question: Topics: variables, expressions, if statement Create a Python program that will calculate the users net pay based on the tax bracket he/she is in. Your

Topics: variables, expressions, if statement

Create a Python program that will calculate the users net pay based on the tax bracket he/she is in. Your program will prompt the user for their first name, last name, their monthly gross pay, and the number of dependents.

The number of dependents will determine which tax bracket the user ends up in. The tax bracket is as followed:

  • 0 1 Dependents : Tax = 20%

  • 2 3 Dependents : Tax = 15%

  • 4+ Dependents : Tax = 10%

    After calculating the net pay, print the name of the user, the monthly gross pay, the number of dependents, the gross pay, the tax rate, and the net pay.

    The formula to compute the net pay is: monthly gross pay (monthly gross pay * tax tax rate)

    Submit your solution on blackboard.

    Sample run:

    Enter your name: Ron Swanson Enter your gross pay: 3500 Enter number of dependents: 0 
    Name: Ron Swanson Gross pay: $3500.00 Dependents: 0 Tax rate: 20% 
    Net Pay: $2800.00 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!