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
Which field can be used to track the progress on tasks that a user has created?
Levart [38]
All of these are correct and what Would work best is a % Complete_ at what this would do is show a 0-100 completion rate
8 0
2 years ago
Which of the following are picture adjustments that can be made to images?
Masteriza [31]

Answer:

D - All of the above

Explanation:

8 0
3 years ago
Read 2 more answers
Swapping two numbers
Tju [1.3M]

Answer:

Swapping two numbers means exchange the values of two variables with each other.

8 0
3 years ago
What is the best description of a programming language?
sergejj [24]

Answer: A: A language that directs a computer to perform tasks and carry out

functions

Explanation: I'm a programmer, and coder, this is the best answer from the given choices

4 0
2 years ago
What theme could come from Piper's feelings and actions. Pixars short film piper
kaheart [24]

Answer:

Overcoming Fear

Explanation:

Given that a movie theme stimulates a universal human ordeal and at the same time, Piper is a short animated movie that was released in 2016. The fundamental idea of the movie is about a baby sandpiper who has to survive and conquer his anxiety and phobia of the water.

Hence, in this situation, the theme that could come from Piper's feelings and action is OVERCOMING FEAR

5 0
3 years ago
Other questions:
  • 9. The best way to insert an existing Excel chart into a document is to A. use the Object command. B. click the Insert tab and c
    6·2 answers
  • What is “centrifugal bumble puppy”? why is it important for games to require a complicated apparatus?
    10·2 answers
  • To delete a database object, right-click the object in the Navigation Pane and then click ____ on the shortcut menu.
    15·1 answer
  • How will you identify a file type on your computer? A file type is the standard used to and information in a computer. All file
    14·2 answers
  • What does the Additional Clock tab do?
    11·1 answer
  • In batch operating system three job J1 J2 and J3 are submitted for execution each job involes an I/O activity a CPU time and ano
    13·1 answer
  • 2.13 LAB: Branches: Leap Year
    11·1 answer
  • What should you do if your computer is running slower
    12·1 answer
  • Pls help I will give points
    11·1 answer
  • What are 6 subtopics on computer programming ?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!