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
What is a Windows feature that allows you to temporarily store text?
nata0808 [166]
This would be copy and paste.

When you select a text, you can use your keys CTRL and C to copy that same selected text. After this, you can use the paste feature by selecting CTRL and V. Doing this, your selected text will be copied and pasted to a certain location. 
3 0
3 years ago
10(            )  8(532.2 )                         
blagie [28]

Answer:

346.30

Explanation:

7 0
3 years ago
Some programming languages permit arbitrary flow of control from any place in a program to any other place in the program. Not J
liraira [26]
Besides portability, another of Java's key advantages is its set of security features which protect a PC running a Java program not only from problems caused by erroneous code but also from malicious programs (such as viruses). You can safely run a Java applet downloaded from the Internet, because Java's security features prevent these types of applets from accessing a PC's hard drive or network connections. An applet is typically a small Java program that is embedded within an HTML page.
4 0
3 years ago
Dani wants to create a web page to document her travel adventures. Which coding language should she use? HTML Java Python Text
FromTheMoon [43]

Answer:

<h2>I would recommend Python Programming language</h2>

Explanation:

The major reason i recommend python is that It has a ton of resources, and community support, such that it is practically impossible to get stuck while carrying out a project

Python is easy,and lets you build more functions with fewer lines of code.

More so, provides a stepping stone to learning other code and it is a very  flexible language

3 0
4 years ago
BRAINLIEST IF ITS RIGHT. !!!25 POINTS!!!
Ber [7]

Answer:

credits

Explanation:

that's where you give the acknowledgments for the images used

6 0
3 years ago
Other questions:
  • What type of attack is targeted against a smaller group of specific individuals, such as the major executives working for a manu
    9·1 answer
  • ♡ Another Dum Question But Oh Wells -.- ♡
    12·2 answers
  • A Molex Connector that connects into a DVD player is easily identifiable by its
    12·2 answers
  • Write a Java program that will 1. Ask the user to type in a sentence, using a JOptionPane.showInputDialog(). 2. The program will
    10·1 answer
  • What is the common name of computers connected in a network?
    10·1 answer
  • Which statement below is incorrect when discussing communication in the online community?
    15·1 answer
  • Assume a TCP segment consisting of 1500 bits of data and 160 bits of header is sent to the IP layer, which appends 120 bits of h
    14·1 answer
  • A Windows user right-clicks on his desktop. What is he planning to do?
    10·1 answer
  • Question 1 (1 point)
    5·2 answers
  • Which of the following is an object-oriented programming language?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!