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]
3 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]3 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
How do entrepreneurs traditionally use computers? check all of the boxes that apply.​
Rudiy27

Answer:

to manage financial records

to e-mail clients

to communicate with clients on social networking sites

to catalog tax records

Explanation:

These are the options;

apply.

to manage financial records

to create advertisements

to communicate with clients on social networking sites

to catalog tax records

to e-mail clients

to complete taxes automatically

to create invoice

A computer which is a machine that make use of instructions to carry out operation in a arithmetic or logical ways through computer programming. Computer is of many help to business today because it can carry out many tasks.Entrepreneurs can traditionally use computers in different ways such as in;

✓ management of financial records

✓e-mailing of clients

✓ communicating with clients on social networking sites

✓ cataloging tax records

6 0
3 years ago
Read 2 more answers
Differentiate between perfect and imperfect market​
andreev551 [17]

Imperfect markets are characterized by having competition for market share, high barriers to entry and exit, different products and services, and a small number of buyers and sellers. Perfect markets are theoretical and cannot exist in the real world; all real-world markets are imperfect markets.

3 0
3 years ago
In terms of data storage and sharing, in what way, if any, do dropbox services differ from archiving services?
ratelena [41]
I believe that the answer is B. 
7 0
3 years ago
Explain Http and Ftp​
larisa86 [58]

Answer:

***HTTP is a protocol which allows the fetching of resources, such as HTML documents. It is the foundation of any data exchange on the Web and it is a client-server protocol, which means requests are initiated by the recipient, usually the Web browse.

**ftp or File Transfer Protocol is a standard communication protocol used for the transfer of computer files from a server to a client on a computer network. FTP is built on a client–server model architecture using separate control and data connections between the client and the server.

4 0
3 years ago
How are mathematics and computer science similar? Discuss any connections between numbers, logic, and other elements.
tester [92]

Answer:

Explanation:

Both mathematics and computer science use variables and logic in order to analyze, explain, and model real-world problems. Also mathematics is a very important part of computer science as the logic and algorithms in computer science require mathematics in order to device systems to solve these problems. For example, data structures in computer science require lots of linear algebra in order to traverse large data collections efficiently, while Artificial Intelligence would need calculus and linear algebra in order for it to be efficient.

7 0
3 years ago
Other questions:
  • Using a loop, write a program that reads in exactly five integers and outputs the sum.
    11·1 answer
  • A router is a device that addresses a packet on a network to the next router along the line. Under which layer of the OSI model
    5·1 answer
  • If anybody knows what does this mean I will answer any questions for you and plz answer this right plz what does that envelope w
    5·2 answers
  • Hazel has just finished adding pictures to her holiday newsletter. She decides to crop an image. What is cropping an image?
    10·1 answer
  • Controlling access of information on the internet
    15·1 answer
  • Please tell fast plzzzzzzzz​
    9·2 answers
  • 20.
    8·1 answer
  • Example of language processor software
    8·1 answer
  • you are asked to create a four-digit code using the numbers from 1 to 9. how many possible codes are there--assuming that number
    15·1 answer
  • What represents a user’s specific preferences?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!