Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Larry Ellison Database Genius Of Oracle

Authors: Craig Peters

1st Edition

0766019748, 978-0766019744

More Books

Students also viewed these Databases questions