Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Tax laws are incredibly complicated. To help cope, you will write a program to do some of the heavy lifting. Your program should accept as
Tax laws are incredibly complicated. To help cope, you will write a program to do some
of the heavy lifting.
Your program should accept as input:
the amount of total income for the year in dollars
the marital status of the user singlemarried
If the user is married, how long have they been married
the current elevation of the user's home address belowatabove sea level
If the user lives above sea level, how many bedrooms are in their house
Your program should produce as output the amount of income tax owed for that year.
The process for calculating the amount of tax owed is as follows:
Yearly Income
If the yearly income is less than $ income tax is of income
If yearly income is greater than or equal to $ but less than or equal to
$ income tax is of income
If yearly income is greater than $ income tax is of income
Marital Status:
If the user is single, no changes are made
If the user is married, $ yearsmarried is subtracted from the income tax
Current Elevation:
If the user lives below sea level, they are either a fish or a cave person and a
processing fee of $ is added to the income tax.
If the user lives at sea level, they must be a ship captain and are subject to
import fees. of income is added to the income tax
If the user lives above sea level, a $ charge per bedroom is added to the
income tax
You do not need to round or truncate your output. Save your program as
Exampy and
upload your source file to the appropriate dropbox in GradeScope, NOT DL
Sample Input Example:
What was your total income for this tax year?:
Are you married? yn: y
How long have you been married?:
Is the elevation of your home address below at above sea level?:
Sample Output Example:
The total tax for is:
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