(Solution) 12 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... | Snapessays.com


(Solution) 12 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...


3.12 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).Enter wall height (feet): 12.5

 

Enter wall width (feet): 15.3

 

Wall area: 180 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).Enter wall height (feet): 12.5

 

Enter wall width (feet): 15.3

 

Wall area: 180 square feet

 

Paint needed: 0.514286 gallons

 

(3) Extend to also calculate and output the number of 1 gallon cans needed to paint the wall. Hint: Use a math function to round up to the nearest gallon. (Submit for 2 points, so 6 points total).Enter wall height (feet): 12.5

 

Enter wall width (feet): 15.3

 

Wall area: 180 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. Hint: Use a dictionary to associate each paint color with its respective cost. Red paint costs $35 per gallon can, blue paint costs $25 per gallon can, and green paint costs $23 per gallon can. (Submit for 2 points, so 8 points total).Enter wall height (feet): 12.5

 

Enter wall width (feet): 15.3

 

Wall area: 180 square feet

 

Paint needed: 0.514286 gallons

 

Cans needed: 1 can(s)

 

Choose a color to paint the wall: red

 

Cost of purchasing red paint: $35import math# Dictionary of paint colors and cost per gallonpaintColors = { 'red': 35, 'blue': 25, 'green': 23}# FIXME (1): Prompt user to input wall's width# Calculate and output wall areawallHeight = float(input('Enter wall height (feet): n'))print('Wall area: ')# FIXME (2): Calculate and output the amount of paint in gallons needed to paint the wall# FIXME (3): Calculate and output the number of 1 gallon cans needed to paint the wall, rounded up to nearest integer# FIXME (4): Calculate and output the total cost of paint can needed depending on color

 


Solution details:
STATUS
Answered
QUALITY
Approved
ANSWER RATING

This question was answered on: May 23, 2022

Solution~00021147602057.zip (25.37 KB)


This attachment is locked

Our expert Writers have done this assignment before, you can reorder for a fresh, original and plagiarism-free copy and it will be redone much faster (Deadline assured. Flexible pricing. TurnItIn Report provided)

Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .
SiteLock

About this Question

STATUS

Answered

QUALITY

Approved

DATE ANSWERED

May 23, 2022

EXPERT

Tutor

ANSWER RATING

GET INSTANT HELP

We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.

You can also use these solutions:

  • ■ As a reference for in-depth understanding of the subject.
  • ■ As a source of ideas / reasoning for your own research (if properly referenced)
  • ■ For editing and paraphrasing.

This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student.

Get Free Price Quote