Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Zybook – paint challenge python

Scenario: Finish the program to compute how many gallons of paint are needed to cover the given square feet of walls. Assume 1 gallon can cover 350.0 square feet. So gallons = the square feet divided by 350.0. If the input is 250.0, the output should be:
0.714285714286
____________________________________-

gallons_paint = 0.0

wall_area = float(input())

# Assign gallons_paint below

''' Your solution goes here '''

print(gallons_paint)

I’ve been trying different combinations and I can’t figure out how to get the float right.
Any help would be appreciated! 🙂

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Assuming wall_area is a floating point number, it’s simple:

gallons_paint = wall_area / 350

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading