Python: 2.5.1 Painting a Wall

3.11.1: program: painting a wall (python 3)
2.36 lab*: program: painting a wall
pseudocode for painting a wall
2.38 lab program painting a wall
2.21 ch 2 program painting a wall (java)
fixme 4 calculate and output the total cost of paint can needed depending on color
enter wall height and width in feet: 12 15 wall area: 180.0 square feet
paint a room java code

I am currently trying to solve this on python. Here's where I've got to so far:

350 square feet requires 1 gallon of paint. Assign gallons_paint with the amount of paint required for wall_area. Sample output for the given program:

250.0 square feet wall will need:
0.714285714286 gallons of paint

wall_area = 250.0
gallons_paint = 0.0

gallons_paint = 0.714285714286

print(wall_area, 'square feet wall will need:')
print(gallons_paint, 'gallons of paint') 

Maybe I am missing something here, but if 350 sq ft requires 1 gallon, then 250 sq ft will require 250/350 gallons. So you are being asked (I suppose) to request the area from the user and calculate the paint required for that area.

wall_area=float(input("How big is your wall in square feet? "))
gallons_paint = wall_area / 350
print(wall_area, 'square feet wall will need:')
print(gallons_paint, 'gallons of paint')

For example,

How big is your wall in square feet? 250
250.0 square feet wall will need:
0.7142857142857143 gallons of paint

Though you really ought to format the number to something sensible, as in

print(f'{gallons_paint:.2f} gallons of paint')

which will report

0.71 gallons of paint

With your other number, 576.6 square feet,

How big is your wall in square feet? 578.6
578.6 square feet wall will need:
1.65 gallons of paint

3.11 Painting a Wall, Failed to connect, retrying. Code Console Commands. @sproutecks2125/. 3.11 Painting a Wall. Python. No description. sign up. No File Open. Files. A Python repl by sproutecks2125. A Python repl by sproutecks2125. @sproutecks2125/ 3.11 Painting a Wall. No description. fork. loading. share. new repl. talk. Sign up.


This is a quite simple problem.

The question gives you the ratio need to construct your program. 1 gallon of paint every 350 square feet. Thus, to find the amount of paint need to paint x square feet, you need to use the equation:

   350        area
 -------  = ------- = 350x = area (or area/350)
    1          x

Using the above equation, we then write out the code:

area = int(input('Input the surface area: '))
print('The amount of paint needed is: ', area / 350)

If you want to control how many decimals places are displayed, you can string formatting:

print('The amount of paint needed is: {0:.<prec>f}'.format(area / 350))

Where <prec> is the desired amount of precision.

Python: 2.5.1 Painting a Wall, Может быть, я что-то отсутствует, но если 350 кв.м требуется 1 галлон, то 250 квадратных футов потребует 250/350 литров. Поэтому вас спрашивают​  Enter wall height (feet): 12 Enter wall width (feet): 15 Wall area: 180.0 square feet Paint needed: 0.5142857142857142 gallons Cans needed: 1 can(s) (4) Extend by prompting the user for a color they want to paint the walls. Calculate and output the total cost of the paint cans depending on which color is chosen.


this could be useful:

wall_area = 250.0

gallons_paint = 0.0

gallons_paint = wall_area/350.0

print(wall_area, 'square feet wall will need:')

print(gallons_paint, 'gallons of paint')

[Solved] 12 Ch 3 Program: Painting a wall (Python 3) (1) Prompt the , Answer to 12 Ch 3 Program: Painting a wall (Python 3) (1) Prompt the user to input a wall's height and width. Calculate and output the wall's area (integer). ----- Starting out with Python, Third Edition, Tony Gaddis Chapter 5 Programming Challenges ----- 8. Paint Job Estimator A painting company has determined that for every 112 square feet of wall


5.8. (Part 1) Paint Job Estimator - Python, Before you begin painting your home's interior walls, ceiling, woodwork, doors, or windows, you need to estimate the amount of paint you'll use. Estimates  Enter wall height (feet): 12 Enter wall width (feet): 15 Wall area: 180.0 square feet (2) Extend to also calculate and output the amount of paint in gallons needed to paint the wall. Assume a gallon of paint covers 350 square feet. Store this value in a variable. (Submit for 2 points, so 4 points total).


Estimating How Much Paint to Buy, Answer to E zyBooks catalog Help/FAQ e 18.11: Ch 3 Program: Painting a wall (​Python 3) (3) Extend to also calculate and output the Calculate and output the wall's area (integer). (Submit for 2 points). Enter wall height (feet): 12 Enter wall width (feet): 15 Wall area: 180 square feet (2) Extend to also calculate and output the amount of paint in gallons needed to paint the wall (floating point). Assume a gallon of paint covers 350 square feet.


Solved: E ZyBooks Catalog Help/FAQ E 18.11: Ch 3 Program , Python 2.5.1. Release Date: April 19, 2007. Python 2.5.1 was released on April 18th, 2007. This is the first bugfix release of Python 2.5. Python 2.5 is now in  Program: Painting a wall (Python 3) (1) Prompt the user to input a wall's height and width Program: Painting a wall (Python 3) (1) Prompt the user to input a wall's height and width. Calculate and output the wall's area. (Submit for 2 points).