Question: python, please . (10 points) Programming Exercise 1 - Income Tax Calculation; applying Flow of Control / Decisions: The original U.S. income tax of 1913

python, pleasepython, please . (10 points) Programming Exercise 1 - Income Tax Calculation;

. (10 points) Programming Exercise 1 - Income Tax Calculation; applying Flow of Control / Decisions: The original U.S. income tax of 1913 was quite simple. The tax was 1 percent on the first $50,000. . 2 percent on the amount over $50,001 up to $75,000. 3 percent on the amount over $75,001 up to $100.000 4 percent on the amount over $100,001 up to $250,000. 5 percent on the amount over $250,001 up to $500,000. 6 percent on the amount over $500,001. There was no separate schedule for single or married taxpayers. Note: Each division of income range above is called a "tax bracket". To calculate the tax amount due, the gross income has to be divided up into such brackets as defined above and sum up the tax amounts for each applicable bracket. For example, suppose income - 700000 then the tax equation is: 0.01-50000 + 0.02* (75000-50000) + 0.03"(100000-75000) + 0.04* (250000-100000) + 0.05*(500000-250000) + 0.06" (income-500000) Your task: Write a program federal_tax_simple.py that computes the income tax according to this schedule. Use these inputs for testing your code and please paste all the results: $25000 $74999 $100050 $450500 $1000000 It is optional to write a loop to process multiple inputs. Or, you can just repeat the run to test all 5 test cases. Hint: 1. Define a constant, pre-calculated, for each full bracket; e.g. BRACKET_1_TAX = 0.01 50000; BRACKET_2_TAX = 0.02 * (7500-50000); 2. Use a decision block to determine how many constants to be added to the tax for the amount belongs to the highest bracket; say, income - 70000, then tax_due - BRACKET_1_TAX + BRACKET_2_TAX + BRACKET_3_TAX + BRACKET_4_TAX + TAX_RATE_OVER500000 (income - BRACKET_4_LIMIT) note: define constants such as TAX_RATE_OVER_500000-0.06, BRACKET_4_LIMIT-500000, etc. No magic number, or literal values in your statements. You need TWO sets of constants: TAX_RATE_OVER_Xs and BRACKET_N_LIMITS

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!