Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python 3.6 Write a program to compute tax using the table given below: For example, from the taxable income of exist400,000 for a single filer,

Python 3.6

image text in transcribed

Write a program to compute tax using the table given below: For example, from the taxable income of exist400,000 for a single filer, exist8, 350 is taxed at 10% (33, 950 - 8, 350) at 15%, (82, 250 - 33, 950) at 25%, (171, 550 - 82, 250) at 28%, (372, 950 - 171, 550) at 33%, and (400,000 - 372, 950) at 35%. The six rates are the same for all filing statuses, which can be represented in the following list: rates = [0.10, 0.15, 0.25, 0.28, 0.33, 0.35] The brackets for each rate for all the filing statuses can be represented in a two dimensional list as follows: brackets = [[8350, 33950, 82250, 171550, 372950], # single filer [16700, 67900, 137050, 208850, 372950], # Married jointly [8350, 33950, 68525, 104425, 186475], # Married separately [11950, 45500, 117450, 190200, 372950] # Head of household Suppose the taxable income is exist400,000 for single filers. The tax can be computed as follows: tax = brackets [0][0] * rates [0] + (brackets [0] [1] - brackets [0] [0] * rates [1] + (brackets [0] [2] - brackets [0] [1] * rates [2] + (brackets [0] [3] - brackets [0] [2] * rates [3] + (brackets [0] [4] - brackets [0] [3] * rates [4] + (400000 - brackets [0] [4] * rates [5]

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_2

Step: 3

blur-text-image_3

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

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions

Question

What is an amortization schedule?

Answered: 1 week ago

Question

Identify the four elements of negligence.

Answered: 1 week ago

Question

=+Are you married?

Answered: 1 week ago

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago