Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python -using the if-else instruction to branch the control path; building a complete program that solves simple real-life problems. Scenario: Consider a country where people

Python -using the if-else instruction to branch the control path; building a complete program that solves simple real-life problems. Scenario: Consider a country where people paid tax last year. The most important tax, called the Personal Income Tax (PIT for short) had to be paid once a year, and was evaluated using the following rule: 1. if the citizen's income was not higher than 85,528 dollars, the tax was equal to 18% of the income minus 550 dollars and 2 cents (this was the so-called tax relief) 2. if the income was higher than this amount, the tax was equal to 14,840 dollars and 2 cents, plus 35% of the surplus over 85,500 dollars. Your task is to write a tax calculator. It should accept one floating-point value: the income. Next, it should print the calculated tax, rounded to full dollars. There's a function named round() which will do the rounding for you - you'll find it in the skeleton code in the editor. Note: this happy country never returns money to its citizens. If the calculated tax is less than zero, it only means no tax at all (the tax is equal to zero). Take this into consideration during your calculations. The code only reads one input value and outputs a result, so you need to complete it with some smart calculations. Test your code using the data we've provided. Test Data: Sample input: 10000 Sample input: 100000 Sample input: 1000 Sample input: -100

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

Step: 3

blur-text-image

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

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions

Question

=+2 Is the decision sustainable in the long run?

Answered: 1 week ago

Question

=+1 Is the decision fair to employees?

Answered: 1 week ago