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
Gnom [1K]
2 years ago
7

Output each floating-point value with two digits after the decimal point, which can be achieved as follows:

Computers and Technology
1 answer:
sdas [7]2 years ago
3 0

Answer:

The modified program in Python is as follows:

import math

paint_colors = {'red': 35,'blue': 25,'green': 23}

wall_height = int(input('Enter wall height (feet):\n'))

wall_width = int(input('Enter wall width (feet):\n'))

area = wall_height*wall_width

print('Wall area:',area,'square feet')

paint_needed = area/350.0

print('Paint needed: {:.2f} gallons'.format(paint_needed))

print('Cans needed:',round(paint_needed),'can(s)')

color = input("Choose a color to paint the wall: ")

print("Cost of purchasing", color, "paint: $",paint_colors[color])

Explanation:

The italicized are given from the question [unchanged]

<em>import math</em>

<em> paint_colors = {'red': 35,'blue': 25,'green': 23} </em>

<em>wall_height = int(input('Enter wall height (feet):\n')) </em>

This gets input for width

wall_width = int(input('Enter wall width (feet):\n'))

Calculate the wall area

area = wall_height*wall_width

Print the calculated wall area

print('Wall area:',area,'square feet')

Calculate the amount of paint needed

paint_needed = area/350.0

Print the amount of paint needed to 2 decimal places

print('Paint needed: {:.2f} gallons'.format(paint_needed))

Print the amount of can needed to nearest integer

print('Cans needed:',round(paint_needed),'can(s)')

Prompt user for color of paint [here, we assume the user input is correct]

color = input("Choose a color to paint the wall: ")

Prints the corresponding amount for the color

print("Cost of purchasing", color, "paint: $",paint_colors[color])

You might be interested in
Explain the following terms as used in word processin
meriva

Answer:

A drop cap (dropped capital) is a large capital letter used as a decorative element at the beginning of a paragraph or section. The size of a drop cap is usually two or more lines.

a superscript is a character(s) half the height of a standard character and printed higher than the rest of the text.

In word processing, the word indent is used to describe the distance, or number of blank spaces used to separate a paragraph from the left or right margins.

6 0
3 years ago
Is anyone else excited for sephiroth (I think I spelt it wrong) in smash. And if you arn't are you excited for christmas
Fed [463]

Answer: idek what that is but okay ;v;

7 0
3 years ago
why might a portrait be both a portrait of the subject and the photographer? how is a photographer present in a portrait?
Nataliya [291]
Because of the reflection on the window or mirror.
5 0
3 years ago
Read 2 more answers
Several users on the second floor of your company's building are reporting that the network is down. You go to the second floor
Juliette [100K]

The troubleshooting step that you should take next is to Question User.

<h3>What is Troubleshooting?</h3>

This refers to the diagnostics that is run on a computer program or system in order to find the problem that is causing it to malfunction or misbehave.

Hence, we can see that based on the fact that several users on the second floor of your company's building are reporting that the network is down and go to the second floor to investigate and find that you are able to access the network, the troubleshooting step that you should take next is to Question User.

Read more about troubleshooting here:

brainly.com/question/13818690

#SPJ1

3 0
2 years ago
Acróstico sobre mouse
Arlecino [84]

<h2>this is a PICTURE </h2>

<h3>i HOPE IT'S HELP </h3>

6 0
3 years ago
Other questions:
  • The sum of all the minterms of a boolean function of n variables is equal to 1.
    7·1 answer
  • What does the abbreviation gps mean?
    9·2 answers
  • Write a program that will ask the user to input a phrase (multiple word sentence), and an integer value. A static function will
    14·1 answer
  • you just finished creating an expense report table, but your boss tells you to create an extra column representing non-productio
    5·1 answer
  • Your marketing director at ABC Marketing Agency would like to set up an email campaign that will use personalization to referenc
    5·1 answer
  • What is a characteristic ofa good cloud-based hosting?
    5·1 answer
  • Why do we need to make a plan before actions?
    7·1 answer
  • What does a pencil icon in the row selector area indicate?
    7·1 answer
  • Write a program that reads a file that contains only integers, but some of the integers have embedded commas, as in 145,020. The
    10·1 answer
  • If an ______ is caught dumping hazardous materials, that person can be prosecuted. Answer choices A) Employee B) Employer C) Bot
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!