Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

code in python def CalculateTax2017(income): if(income=9326 or income37950 or income91900 or income191650 or income416700 or income418400): totaltax=0.10(9325)+0.20(37950-9325)+0.25(91900-37950)+0.28*(191650-91900)+0.33(416700-191650)*0.35(418400-416700)+0.396(income-418400) return totaltax def CalculateTax2018(income): if(income9525 or income38700 or

image text in transcribedimage text in transcribed

code in python

def CalculateTax2017(income): if(income=9326 or income37950 or income91900 or income191650 or income416700 or income418400): totaltax=0.10(9325)+0.20(37950-9325)+0.25(91900-37950)+0.28*(191650-91900)+0.33(416700-191650)*0.35(418400-416700)+0.396(income-418400) return totaltax

def CalculateTax2018(income): if(income9525 or income38700 or income82500 or income157500 or income200000 or income500000): totaltax=0.10(9525)+0.12(38700-9525)+0.25(82500-38700)+0.28*(157500-82500)+0.33(200000-157500)*0.35(500000-200000)+0.37(income-500000) return totaltax

loop=True income=int(input(" Enter the income: $")) if(income

I need this code but without the function "def"

Program Set 2 (15 Points) This assignment will give you more experience on the use of: 1. integers (int) 2. floats (float) 3. conditionals(if statements) 4. iteration(loops) The goal of this project is to make a fictitious comparison of the federal income. You will ask the user to input their taxable income. Use the income brackets given below to calculate the new and old income tax. For the sake of simplicity of the project we will only consider individuals and not married users. We will also ignore any tax deductions while calculating income taxthey can significantly alter the tax, but add too much complexity for our programming project. New income tax brackets (2018 and newer) Rate Income range 10% Up to $9,525 12% $9,526 to $38,700 22% $38,701 to $82,500 24% $82,501 to $157,500 32% $157,501 to $200,000 35% $200,001 to $500,000 37% over $500,000 Old income tax brackets (2017 and older) Rate Income range 10% Up to $9,325 15% $9,326 to $37,950 25% $37,951 to $91,900 28% $91,901 to $191,650 33% $191,651 to $416,700 35% $416,701 to $418,400 39.6% over $418,400 Assignment Background Being in the 25% tax bracket doesn't mean you pay 25% on everything you make. The progressive tax system means that people with higher taxable incomes are subject to higher tax rates, and people with lower taxable incomes are subject to lower tax rates. For example, let's say you're a filer with $32,000 in taxable income. That puts you in the 15% tax bracket in 2017. But do you pay 15% on all $32,000? No. Actually, you pay only 10% on the first $9,325; you pay 15% on the rest. (Look at the tax brackets above to see the breakout.) If you had $50,000 of taxable income, you'd pay 10% on that first $9,325 and 15% on the chunk of income between $9,326 and $37,950. And then you'd pay 25% on the rest, because some of your $50,000 of taxable income falls into the 25% tax bracket. The total bill would be $8,238.75 about 16% of your taxable income, even though you're in the 25% bracket. Project Description Your program must meet the following specifications: 1. At program start, prompt the user for their income 2. Repeatedly prompt the user for new income until a negative income is entered. 3. Calculate the income tax using the 2017 and 2018 tax bracket tables above. 4. For each income entered: a. Calculate the 2017 income tax and store it in a variable. b. Next calculate the 2018 income tax and store it in a variable c. Print i. The income ii. The 2017 tax iii. The 2018 tax iv. The difference between the and 2017 tax rounded to cents. v. The difference between the 2018 and 2017 tax as a percentage of the 2017 tax rounded to cents Assignment Notes 1. To clarify the project specifications, sample test runs output is appended to the end of this document. 2. Use a while loop that keeps looping as long as the income is greater than or equal to zero. Prompt for income before the loop 4. There will be no error checking in this assignment. If a float or a string is entered at the prompt, the program will crash. 5. All income input must be integers. Test Runs Test Run 1 Enter income as an integer with no commas: 8000 Income: 8000 2017 tax: 800.00 2018 tax: 800.00 Difference: 0.00 Difference (percent): 0.00 Enter income as an integer with no commas: 15000 Income: 15000 2017 tax: 1783.75 2018 tax: 1609.50 Difference: -174.25 Difference (percent): 9.77

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

Students also viewed these Databases questions

Question

=+ a. What happens to the labor demand curve?

Answered: 1 week ago