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
Give me 5 examples of Cyber Security
Vera_Pavlovna [14]

Answer:

Firewalls, Antiviruses, Malware, Antispyware,

Explanation:

8 0
2 years ago
What are the primary functions of motor oil? a. Reduce friction and prevent wear b. Keep engine surfaces clean c. Remove heat to
ryzh [129]

The answer is E: all of the above.

7 0
3 years ago
3. Wi-fi connections have limited range of :
Tamiku [17]

Answer: D) 300 metres would be my choice because our wifi can only go that far outdoors, inside wifi can only travel up to 150 metres.

Explanation: Hope this helps! Have a wonderful day!

Don’t forget to thanks & Brainliest is always appreciated!

3 0
2 years ago
The best reason for using Independent software test teams is that
Kobotan [32]
The answer is B) A test team will test the software more thoroughly
4 0
3 years ago
Some problems are better solved by a computer and some are better solved by humans.
aalyn [17]

Answer:

I say when u don't know the answer completly.

3 0
2 years ago
Other questions:
  • True or false A ClassB fire involves live electrical equipment
    5·1 answer
  • A network administrator recently implemented two caching proxy servers on the network. how can the administrator best aggregate
    5·1 answer
  • ¿por que la toria de lamarck sobre el alargamiento del cuello de las jirafas por el esfuerzo continuado no pasara a sus descendi
    10·1 answer
  • Which should be addressed by stakeholders when reviewing the problem statement? Select all that apply. All possible outcomes hav
    12·1 answer
  • Which type of error occurred in the following lines of code?
    13·1 answer
  • Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integer
    9·1 answer
  • A(n) __________ prevents outsiders from accessing corporate information the user does not want others to see.
    9·1 answer
  • If you see these REPORT.
    14·2 answers
  • What is the difference between a crosstab query and a subquery?
    11·2 answers
  • Describe your previous personal or professional experience with Microsoft Word.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!