Question: Python Question : See in photos Thank you a lot. -- (3) Extend to also calculate and output the number of 1 gallon cans needed

Python Question :

See in photos

Python Question : See in photos Thank you a lot. -- (3) Extend to also calculate and output the number of 1 gallon cans needed to paint the wal. Hint: Use a math function to round Thank you a lot.

--

(3) Extend to also calculate and output the number of 1 gallon cans needed to paint the wal. Hint: Use a math function to round up to the nearest gallon. (Submit for 2 points, so 5 points total) Enter wall height (feet): Enter wall width (feet): 15 Wall area: 165 square feet Paint needed: 0.471429 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. Red paint costs $35 per gallon can, blue paint costs $25 per gallon can, and green paint costs $23 per gallon can Hint: to account for the paint color, you can either use an "if... elif . else sequence to test for equality of the input color string with each of the three allowed strings red', blue, or green, or else use a dictionary like the one below to associate each paint color with its respective cost. (Submit for 3 points, including one hidden test case, so 8 points total) paintcolors 'red': 35, blue': 25, green': 23 The output should look like: Enter wall height (feet): Enter wall width (feet): 15 WalI area 1.65 square feet Paint needed: 0.471429 gallons Cans needed: 1 can (s) choose a color to paint the wall: red Cost of purchasing red paint: $35

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!