Question
The United States federal personal income tax is calculated based on filing status and taxable income. There are four filing statuses: single filers, married filing
The United States federal personal income tax is calculated based on filing status and taxable income. There are four filing statuses: single filers, married filing jointly or qualified widow(er), married filing separately, and head of household. To simplify the problem, we assume that the tax rates for single status and married filing separately status are the same, and the tax rates for married filing jointly status and head of household status are the same. The table below shows a simplified version of rate details(i.e., this is not the real rate table). Here are two examples to help you understand how to use the rate table.
1) If you are singlewith a taxable income of $20,000, the first $9,700 is taxed at 10% and the remaining amount is taxed at 12%, so your total tax is tiered as $9,700 * 10% + ($20,000 -$9,700) *12%.
2) If you are single with a taxable income of $200,000, the first $9,700 is still taxed at 10%, but different rates are applied to income in different brackets and the amount above $160,725 istaxed at 32%, so your total tax is tiered as $9,700 * 10% + ($39,475-$9,700) *12%+ ($84,200 -$39,475) *22% + ($160,725 -$84,200) *24% + ($200,000-$160,725) *32%.
Create a Python program that calculates a users tax based on the users income level and tax filing status. Requirements:Ask user to enter a taxable income and tax filing status. Note: you mustoffer users4 tax statuses. For example, ask user to enter 1 for single, 2 for married filing separately, 3 for married filing jointly or qualified widow(er), and 4 for head of household. For a tax filing status, you need to use multi-level if-elif-else statements to figure out the tax. Display a message summarizing the users tax status, income, and tax amount in proper formats. Fix any syntax errors and test your code if you can. For example, for a single with income $200,000, the tax is $45,316.5; with income $100,000, the tax is $18,174.5; with income $60,000, the tax is $9,058.5; with income $20,000, the tax is $2,206.0. For a married-jointly status with income $400,000, the tax is $90,633; with income $200,000, the tax is $36,349; with income $100,000, the tax is $13,717; with income $20,000, the tax is $2,012.
Marginal Tax Rate Single Married Filing Separately Married Filing Jointly or Qualifying Widow(er) Head of Household 10% $0 $9,700 $0-$9,700 $0-$19,400 $0-$19,400 12% $9,701-$39,475 $9,701-$39,475 $19,401 - $78,950 $19,401 - $78,950 22% $39,476 - $84,200 $39,476 - $84,200 $78,951 - $168,400 $78,951 - $168,400 24% $84,201 - $160,725 $84,201 - $160,725 $168,401 - $321,450 $168,401 - $321,450 32% $160,726+ $160,726 + $321,451+ $321,451+Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started