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
netineya [11]
2 years ago
14

Use the round function to modify the program to display at most two digits of precision in the output number.

Computers and Technology
1 answer:
jeka57 [31]2 years ago
7 0

Using the Round Function to modify the program the program is now written as follows:

TAX_RATE = 0.20

STANDARD_DEDUCTION = 10000.0

DEPENDENT_DEDUCTION = 3000.0

# Request the inputs

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

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

# Compute the income tax

taxableIncome = grossIncome - STANDARD_DEDUCTION - \

DEPENDENT_DEDUCTION * numDependents

incomeTax = taxableIncome * TAX_RATE

# Display the income tax

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

<h3>What is the Round Function?</h3>

In Python, the Round Function is sued to being the display values to display an intended amount of decimals, hence the rounding function.

It should be noted that the round function requires two inputs:

  • the value to be rounded and
  • the number of precision digits.

The round function will round the Income Tax to two decimal places if we use 2 as the second argument.

The round function must be enclosed within the str function in order for the rounded value to be turned to a string and then linked with another string to display the entire income tax phrase.

Learn more about Round Function at:
brainly.com/question/15077869
#SPJ1

Download txt
You might be interested in
As it turns out, the scale of this chart is higher than all of these; it’s “exponential.” What does this imply for the difficult
Oksanka [162]

Answer:

no meme

Explanation:

[...]

8 0
3 years ago
As Jason walks down the street, a large raven starts squawking at him and flapping its wings. Jason thinks to himself ‘That bird
UNO [17]

Answer:

Answer to the following question is anthropomorphism.

Explanation:

Anthropomorphism is considered as the error in the following context of the scientific reductionism. Anthropomorphize is the source of an error that needs to reconsider.

Anthropomorphism is an attribute of the human qualities, emotions, thoughts, motivation, intentions, and characteristics to the non-living beings or the nonhuman beings, things or objects.

8 0
3 years ago
The ____ option must be used when running a program in order to see the results of assert statements.
Lera25 [3.4K]

Answer:

-ea

Explanation:

We can enable or disable assertions in java, by default this assertions are disabled at runtime, but we can use two commands, for example, if we want to enable assertions at various granularities, we can use the -enableassertions, or -ea, switch, if we want to disable at various granularities, is -disableassertions, or -da.

4 0
3 years ago
1. Jaina is a big fan of a popular comic book series, and is so inspired that she decides to write her own story. She starts her
dolphi86 [110]

Answer:

copyright infringement

Explanation:

4 0
4 years ago
Online
Tanya [424]

Answer:

i can't understand what u want to say

5 0
3 years ago
Other questions:
  • You have been asked to create an authentication security plan for your company. Which of the following components would you inco
    14·1 answer
  • Truncation is a keyword search technique that helps you find useful variations of a term or terms. You want to find books on the
    5·1 answer
  • The difference between natural and technological system
    9·1 answer
  • The tax calculator program of the case study outputs a floating-point number that might show more than two digits of precision.
    7·1 answer
  • In which job role would a course in 3D modeling help with professional career prospects?
    9·2 answers
  • When discussing the data-modeling building blocks, anything (a person, a place, a thing, or an event) about which data are to be
    15·1 answer
  • How do big organizations take back their data to be reviewed after a disaster?
    6·1 answer
  • How can knowing internal and external parts of computer help me
    12·1 answer
  • At the heart of every computing device is a(n) _______________, which is usually a single, thin wafer of silicon and tiny transi
    12·1 answer
  • What is Frederick Taylor attributed to doing
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!