subject

The marginal state income tax rates in Kansas for single people are: Range Tax Rate
$0 to $15,000 3.1%
15,001 to $30,000 5.25%
30,0001 and up 5.7%

For example, someone who earns $35,000 will pay 3.1% tax on the first $15,000 of her salary, 5.25% on the next $15,000, and 5.7% on the remaining income. Complete the function compute_tax that uses a multiway if-statement to compute and return the total tax due for the salary stored in the argument named salary. Test your code for each of the following salaries:

a. $35,000 (tax due should be $1,537.50)
b. $25,000 (tax due should be $990.00)
c. $5,000 (tax due should be $155.00)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 19:20
Number of megabytes of ram in a computer. qualitative or quantitative? because
Answers: 3
question
Computers and Technology, 22.06.2019 19:20
Amedian in the road will be marked with a white sign that has a black arrow going to the left of the median. true false
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
question
Computers and Technology, 24.06.2019 08:00
Java the manager of a football stadium wants you to write a program that calculates the total ticket sales after each game
Answers: 1
You know the right answer?
The marginal state income tax rates in Kansas for single people are: Range Tax Rate
$0 to $15...
Questions
question
Mathematics, 29.09.2019 02:30
question
Mathematics, 29.09.2019 02:30
Questions on the website: 13722363