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
Which data type stores a single letter?
Irina-Kira [14]

Answer:

c

Explanation:

4 0
3 years ago
if you dont' have access to nessus, which of the following can be used by an attacker to gain information about remote *nix host
galina1969 [7]

The NMap procedure that can be used to help you to gain information about remote *nix hosts is Script Scanning

<h3>What is script scanning?</h3>

The script scanner is known to be tool that acts as a measure component to the real Windows scripting host component as it helps to intercepts scripts, and also scans them before they are said to be executed.

Therefore, The script scanner is known to be tool that acts as a measure component to the real Windows scripting host component as it helps to intercepts scripts, and also scans them before they are said to be executed.

Learn more about Script Scanning from

brainly.com/question/18152781

#SPJ11

4 0
2 years ago
Many documents use a specific format for a person's name. Write a program whose input is: firstName middleName lastName and whos
goblinko [34]

Answer:

The solution code is written in Python:

  1. name = input("Enter your name: ")
  2. name_components = name.split(" ")
  3. first_name = name_components[0]
  4. middle_name = name_components[1]
  5. last_name = name_components[2]
  6. print(last_name + ", " + first_name[0] + "." + middle_name[0])

Explanation:

Firstly, prompt user to enter name (Line 1).

Next, use the string <em>split()</em> method and use space " " as separator to split the input string into individual component, first name, middle name, last name and assign to variable <em>first_name, middle_name </em>and<em> last_name </em>(Line 5-7).

Display the output as required by the question.

6 0
3 years ago
Your organization wants to implement a 5-year rotation plan for all of its computing devices. What percentage of the computer fl
sashaice [31]

Answer:

20

Explanation:

C the answer is 20

7 0
3 years ago
Read 2 more answers
Which phrase describes a dependent cell in Excel 2016? a cell that feeds data into another cell a cell that has data fed into it
vovangra [49]

Answer:

a cell that feeds data into another cell

Explanation:

The dependent cell means the cell which refers to another cell.

Just take an example

If cell c15 involves the formula = B10

So c15 is being dependent on cell b10

For reaching this we visit to formulas section after that dependent and precedent occurs

So according to the given options, the first option is correct

4 0
4 years ago
Other questions:
  • Define the term e-learning​
    5·2 answers
  • What is the name of the image window area that identifies the project you are working on?
    7·1 answer
  • Write a program to read 2 numbers and display the largest of the two. You should use scanfto read the two numbers and use if sta
    8·1 answer
  • The relational model describes data using a standard tabular format; all data elements are placed in three-dimensional tables ca
    5·1 answer
  • Which of the following is a correct statement about writing down passwords on a ""cheat sheet?""
    7·1 answer
  •  How does critically analyzing technology add value to interactions with people in personal and professional contexts?
    7·2 answers
  • Ron is creating building blocks in Word. How can he make the building blocks that he created available?
    8·2 answers
  • Select the device that will have the most network ports
    8·1 answer
  • ¿Que similitudes y que diferencias tenían el estado y la iglesia en el proceso de colonizacion de america?​
    6·1 answer
  • Write a function called add_tuples that takes three tuples, each with two values, and returns a single tuple with two values con
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!