Answered step by step
Verified Expert Solution
Link Copied!

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 (single/married) o If the user is married, how long have they been married the current elevation of the users home address (below/at/above sea level) o 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 $10,000, income tax is 2.3% of income If yearly income is greater than or equal to $10,000 but less than or equal to $50,000, income tax is 4.5% of income If yearly income is greater than $50,000, income tax is 6.1% of income Marital Status: If the user is single, no changes are made If the user is married, ($1.62* years_married) 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 $18.32 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. 1.6% of income is added to the income tax If the user lives above sea level, a $5.00 charge per bedroom is added to the income tax You do not need to round or truncate your output. Save your program as Exam1.py and upload your source file to the appropriate dropbox in GradeScope, NOT D2L! Sample Input Example: What was your total income for this tax year?: 10000 Are you married? [y/n]: y How long have you been married?: 5 Is the elevation of your home address below-1, at-2, above-3 sea level?[1/2/3]: 2 Sample Output Example: The total tax for 10000.0 is: 601.9

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_2

Step: 3

blur-text-image_3

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

Database Systems For Advanced Applications 17th International Conference Dasfaa 2012 Busan South Korea April 2012 Proceedings Part 1 Lncs 7238

Authors: Sang-goo Lee ,Zhiyong Peng ,Xiaofang Zhou ,Yang-Sae Moon ,Rainer Unland ,Jaesoo Yoo

2012 Edition

364229037X, 978-3642290374

More Books

Students also viewed these Databases questions