Question: Write a program that implements the pseudocode below: Ask the user for their taxable income. Compute and output the marginal tax rate as follows: -

Write a program that implements the pseudocode below:

Ask the user for their taxable income. Compute and output the marginal tax rate as follows: - Error if income is negative - 10% if income $0 - $9,700 - 12% if income $9,701  $39,475 - 22% if income $39,476  $84,200 - 24% if income $84,201  $160,725 - 32% if income $160,726  $204,100 - 35% if income $204,101  $510,300 - 37% if income $510,301+ 

Think about the order of your decisions: elif/else clauses are considered only if the previous condition is false!

A sample run of your program should look like:

Enter taxable income: 120000 Marginal tax rate: 24% 

and another sample run:

Enter taxable income: -50000 Marginal tax rate: Error

Must be done in python idle

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!