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
If you are trying move a hard drive from a non-working computer to a working computer for the purposes of accessing the data on
Llana [10]
You must have an administrator password before you can access the drive <span />
5 0
3 years ago
Identify which of these types of sampling is​ used: random,​ systematic, convenience,​ stratified, or cluster. To determine her
Zarrin [17]

Answer:

B.

Explanation:

Based on the sampling methods provided in regards to the question it can be said that the method being used is called Simple Random. This refers to dividing the population into different group which are then chosen at random, giving each group an equal chance of getting chosen. Which is exactly what is going on in this scenario, as the day is divided into three parts and her mood is measured randomly during each part of the day.

6 0
3 years ago
Calculate the number of telephone
olchik [2.2K]

Answer:

yho

Explanation:

hayi no ntwana.... lala boy

6 0
3 years ago
A notebook computer usually is more expensive than a desktop computer with the same capabilities because it ____.
KonstantinChe [14]
Because it is more portable.
6 0
3 years ago
What are some types of vehicle technology advancements?
julia-pushkina [17]

Answer:

D is the suitable answer.

Explanation:

All of the above

5 0
3 years ago
Other questions:
  • The strFirstName and strLastName variables contain the strings "Jane" and "Jones," respectively. Which of the following statemen
    14·1 answer
  • You’ve been stuck in bumper-to-bumper traffic for nearly an hour on a hot summer day. The temperature warning light has just com
    7·1 answer
  • The only way to print a photo is on a special glossy paper using professional printing services in a store
    9·2 answers
  • How are online sources used? Check all that apply.
    8·2 answers
  • Imagine you were going to use a dedicated workstation for an animation job rather than a personal PC or the all-purpose PCs you
    5·1 answer
  • Technology has had
    10·1 answer
  • 1.Which one of the following buttons returns a window to its original size?
    11·1 answer
  • Which storage is faster than secondary storage​
    14·2 answers
  • How was data put into the Tabulating Machine?
    7·1 answer
  • Give an example of an occasion when you used logic to solve a problem
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!