Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed image text in transcribed image text in transcribed 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases New Opportunities For Connected Data

Authors: Ian Robinson, Jim Webber, Emil Eifrem

2nd Edition

1491930896, 978-1491930892

More Books

Students also viewed these Databases questions

Question

How flying airoplane?

Answered: 1 week ago