Answered step by step
Verified Expert Solution
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
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: $35Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started