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
The groups within a tab are collectively<br> known as?
vagabundo [1.1K]

Answer:

the ribbon

Explanation:

Commands are organized in logical groups, which are collected together under tabs. Each tab relates to a type of activity, such as formatting or laying out a page. To reduce clutter, some tabs are shown only when needed.

6 0
3 years ago
What is processing unit?​
Arte-miy333 [17]

Answer:

A central processing unit, also called a central processor, main processor or just processor, is the electronic circuitry within a computer that executes instructions that make up a computer program.

Explanation:

6 0
3 years ago
Read 2 more answers
When you use the .net data provider objects to retrieve data from a database, you can store the data in an object called a?
Ainat [17]
Data set is the object that you can store data.
6 0
3 years ago
A __________ is more concerned with copying and running code, rather than the code's maintainability or documentation.
gladu [14]

Answer: system architect

Explanation:

A system architect is more concerned with copying and running code, rather than the code's maintainability or documentation

3 0
2 years ago
Astronauts on the Moon can jump higher than if they were on Earth. This is because...
sergejj [24]
It'll be B) The moon is less massive than the Earth

Mass relates to how much gravitational pull something has.
Since the moon is significantly less massive than the moon it inherently has less gravity than on Earth thus allowing the astronauts to jump higher on the moon than on Earth
4 0
4 years ago
Read 2 more answers
Other questions:
  • What is the most common programming language that's not python?
    15·2 answers
  • Describe a function that would take in any RGB value and double its intensity. What do you think happens if the input is 200, 22
    8·1 answer
  • Which javascript method should you use if you want to specify a message string to appear on your web page as it loads?
    13·1 answer
  • What would be advantageous for a laptop user to carry when the laptop gets a lot of use?
    14·1 answer
  • In order for two computers to communicate via the internet, they must first locate one another. How do computers locate one anot
    12·1 answer
  • An experienced user has installed Oracle VM VirtualBox on her workstation and is attempting to use it to create a virtual machin
    6·1 answer
  • Which of the following are documents that can help you to review and assess your organization’s status and state of security? Fi
    6·1 answer
  • What episode and Season of Simpsons is this
    10·1 answer
  • Engineers perform a(n) blank to compare the possible negative effects of making a decision involving technology with the possibl
    9·2 answers
  • What does it mean that the right mouse button is context-sensitive?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!