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
NEED HELP FAST
olganol [36]
The answer is b absloute is very incorrect because the ressinanse is a very important period


3 0
3 years ago
Read 2 more answers
​_____ was the first commercially successful computer. ​z3 ​eniac ​univac ​colossus
Lera25 [3.4K]
 <span>​ENIAC was the first commercially successful computer, released in 1946.
</span>The name ENIAC Electronic Numerical Integrator And Computer<span>).</span><span>
 It was </span>used to calculate artillery firing tables for the United States Army's Research Laboratory.
It was invented by J. Presper Eckert and John Mauchly at the University of Pennsylvania.
7 0
3 years ago
Integrity constraints are enforced by Group of answer choices A. The operating system B. The end user C. The database designer D
slega [8]

Integrity constraints are enforced by The database designer.

<h3>What are Integrity constraints?</h3>

An  Integrity Constraints is known to be the protocols that a table's data columns is mandated to follow.

Note that they are used to hinder the types of information that can be put into a table and as such, Integrity constraints are enforced by The database designer.

Learn more about Integrity constraints from

brainly.com/question/28026113

#SPJ1

4 0
2 years ago
3 Points
tino4ka555 [31]

Answer:

its B the person in the comments were right

Explanation:

took an edge test

6 0
3 years ago
If the algorithm does not have instructions for unanticipated results, the computer program will a. solve a problem b. start ove
MrMuchimi

Answer: halt, just did the question

6 0
3 years ago
Other questions:
  • How to remove a channel from favorite list on suddenlink?
    15·1 answer
  • Holly would like to run an annual major disaster recovery test that is as thorough and realistic as possible. She also wants to
    5·1 answer
  • Write a Temperature class that will hold a temperature in Fahrenheit, and will provide methods to get and display the temperatur
    5·1 answer
  • Which of the following scenarios can best be addressed by operations management?
    11·1 answer
  • Some data files should be totally hidden from view, while others should have ____ so users can view, but not change, the data.
    11·1 answer
  • Write a program that displays the following menu:
    8·1 answer
  • Baking Cookies. Sweet Dough Inc. bakes cookies—a popular dessert—based on the quantities ordered by their customers. Three raw m
    12·1 answer
  • Which type of error occurred in the following lines of code?
    13·1 answer
  • You are writing a program to help compare two sports teams. A sample member of the list scores is [2. 5] where your team scored
    5·2 answers
  • The Synonyms submenu offers a list of synonyms for a word. Is it always a good idea to use whatever synonyms are presented on th
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!