1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Lubov Fominskaja [6]
3 years ago
7

The tax calculator program of the case study outputs a floating-point number that might show more than two digits of precision.

Computers and Technology
1 answer:
Aneli [31]3 years ago
4 0

Answer:

TAX_RATE = 0.20

STANDART_DEDUCTION = 10000.0

DEPENDENT_DEDUCTION = 3000.0

gross_income = float(input("Enter the gross income: "))

number_of_dependents = int(input("Enter the number of dependents: "))

income = gross_income - STANDART_DEDUCTION - (DEPENDENT_DEDUCTION * number_of_dependents)

tax = income * TAX_RATE

print ("The income tax is $" + str(round(tax, 2)))

Explanation:

Define the <em>constants</em>

Ask user to enter the <em>gross income</em> and <em>number of dependents</em>

Calculate the <em>income</em> using formula (income = gross_income - STANDART_DEDUCTION - (DEPENDENT_DEDUCTION * number_of_dependents))

Calculate the <em>tax</em>

Print the <em>tax</em>

<em />

round(number, number of digits) -> This is the general usage of the <em>round</em> function in Python.

Since we need <u>two digits of precision</u>, we need to modify the program as str(<u>round(incomeTax, 2</u>)).

You might be interested in
Clara works behind a computer all day. She gets a lot of headaches, and her eyes have been hurting her lately. Her doctor diagno
Vinil7 [7]

Answer:

Clara should use computer lenses and artifical tears.

The computer lenses help block blue light from entering your eyes which would help with the headaches and help you focus on something further away. The artificial tears help lubricate dry eyes which prevents or in Clara's case, reduces/relieves eye strain.

8 0
2 years ago
Which of the following is your personal record of payments and bill-paying?
oksian1 [2.3K]

Answer:

I believe its a statement

Explanation:

4 0
3 years ago
What does it mean "Be Proactive"?
joja [24]

Answer:controlling a situation by making things happen or by preparing for possible future problems

Explanation:

4 0
2 years ago
Read 2 more answers
Why do you think that so many of these sources have similar names?
Anon25 [30]

Answer:

What sources? WILL ANSWER in comments

4 0
3 years ago
Is a term used to define those providers or hospitals that have the capabilities and processes in place to be actively use certi
aksik [14]
Meaningful use (MU) i<span>s a term used to define those providers or hospitals that have the capabilities and processes in place to be actively use certified electronic health record technology.
</span><span>This term is used in a health information technology (HIT) context.
</span><span> It defines minimum U.S. government standards for </span>using<span> electronic health records (EHR) and for exchanging patient clinical data between healthcare providers.</span>
5 0
3 years ago
Other questions:
  • PLS HELP ASAP! WILL GIVE BRAINLIEST!
    14·1 answer
  • 1. How does inertia affect a person who is not wearing a seatbelt during a collision? 
    14·2 answers
  • Generate the requested sets using only set builder notation and the provided sets. Some problems may require you to build one or
    15·1 answer
  • It proceeds the statement causes execution of the current loop iteration to end and commence at the beginning of the next loop.
    10·1 answer
  • Help, please!! A file named "games.txt" exists and has 80 lines of data. You open the file with the following line of code. aFil
    6·1 answer
  • Software that gives network administrators the ability to provide computer assistance from a central location by allowing them t
    15·1 answer
  • Describe the relative benefits of routing over a broadcast style of communication. Is routed traffic more secure than broadcasti
    14·1 answer
  • This isn't really a question ,but a random fact about Fnaf William Aton
    7·2 answers
  • What are 6 subtopics on computer programming ?
    13·1 answer
  • If String str = "Computer Science";, then what is the value of str.substring(10);? ​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!