Question: Tax Calculator ( conditional flow control ) The simplest income tax calculation for a single person filing federal income taxes in the United States involves
Tax Calculator conditional flow control
The simplest income tax calculation for a single person filing federal income taxes in the United States involves applying a standard deduction, personal exemption and marginal
tax rates to the annual income of the taxpayer. For tax year the standard deduction for an individual was $ and the personal exemption was $ The tax rates
vary by income bracket and are given in the table below.
To compute the tax liability on a given income, first the deduction and exemption amounts are subtracted, then each portion of the income is taxed at the marginal rate according
to the table. For example, for an income of $US median income in you first apply the standard $ deduction and the $ exemption to get a taxable
income of $$$$ Then to compute the tax liability you have:
totalTax $
You can calculate an "effective tax rate" based on the original income as
effectiveTaxRate
or described above to compute the total tax liability and assign the result to the output variable totalTax. Also compute the effective tax rate and assign this value decimal value,
not percent to the effectiveTaxRate output variable.
Note the value of the variable income is defined as an input to the function. Do not overwrite this value in your code. Be sure to assign a value to each of the output variables.
function totalTax effectiveTaxRate incomeTaxIncome
Write the commands for your function here.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
