Question
Xcode or cus please!

E. Tax Calculator amount, the write a program to prompt for the income, then calculate and display the initia practices amount after deductions, and the deducted amount. Again use good programming Display messages so that the results are understandable. Assume individuals are taxed at an incremental rate as given below: Incremental Income Tax Rate 0 to $30,000.00 0% $30,000.01 to $50,000 10% $50,000.01 to $100,000 20% $100,000.01 to $200,000 30% $200,000.01 to $250,000 35% 250,000.01 40% Note that the above ranges are not total income but additional income. For example if one earns S125,000 per year, then there is no tax on the first $30,000. The next $20,000 is taxed at a rate of 10 percent, the next $50,000 is taxed at a rate of 20 percent, and the remaining $25,000 is taxed at a rate of 30 percent.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

The code is given in python which will run on your xcode.

income = float(input('What is your income? '))
if income <= 30000:
print "Your income is", income
print "Your income is below 30,000 so you don't need to pay tax"
elif income > 30000 and income <=50000:
tax=(income-30000)*0.1 # 10% tax is calculated here for given condition
print "Your income is", income
print "Your tax is", tax
elif income > 50000 and income <=100000:
tax=((income-50000)*0.2)+((50000-30000)*0.1) # 20% tax is calculated here for given condition
print "Your income is", income
print "Your tax is", tax
elif income > 100000 and income <=200000:
tax=((income-100000)*0.3)+((100000-50000)*0.2)+((100000-50000-30000)*0.1) # 30% tax is calculated here for given condition
print "Your income is", income
print "Your tax is", tax
elif income > 200000 and income <=250000:
tax=((income-200000)*0.35)+((200000-100000)*0.3)+((200000-100000-50000)*0.2)+((200000-100000-50000-30000)*0.1) # 35% tax is calculated here for given condition
print "Your income is", income
print "Your tax is", tax
elif income > 250000:
tax=((income-250000)*0.4)+((250000-200000)*0.35)+((250000-200000-100000)*0.3)+((250000-200000-100000-50000)*0.2)+((250000-200000-100000-50000-30000)*0.1) # 40% tax is calculated here for given condition
print "Your income is", income
print "Your tax is", tax

Output:

Success comments (0) a stdin copy 6000000 o stdout What is your income? Your income is 6000000.e Your tax is 2269500.0 copy

Add a comment
Know the answer?
Add Answer to:
Xcode or cus please! Write a program to prompt for the income, then calculate and display...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • FART I TRUE FALSE QUESTIONS (10 points). Please write True (1) or False (F) on the...

    FART I TRUE FALSE QUESTIONS (10 points). Please write True (1) or False (F) on the blank Scarcity is the intimited nature of society's resources given society's limited wants 2. A reward is a type of positive incentive. 3. To remove difficulty of double coincidence of wants we use money. 4. An exogenous factor is a variable that can be controlled for inside the model. 5. The PPF will not have a constant slope. 6. The law of demand states...

  • Please read the article and answer about questions. You and the Law Business and law are...

    Please read the article and answer about questions. You and the Law Business and law are inseparable. For B-Money, the two predictably merged when he was negotiat- ing a deal for his tracks. At other times, the merger is unpredictable, like when your business faces an unexpected auto accident, product recall, or government regulation change. In either type of situation, when business owners know the law, they can better protect themselves and sometimes even avoid the problems completely. This chapter...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT