Program Specifications Write a program to calculate the cost to paint a wall. Amount of required paint is based on the wall area. Total cost includes paint and sales tax. Note: This program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only a portion of tests pass after each step but confirm progress. Step 1 (2 pts). Read from input wall height, wall width, and cost of one paint can (floats). Calculate and output the wall's area to one decimal place using print (f"Wall area: {wall_area:.1f} sq ft");. Submit for grading to confirm 1 test passes. Ex: If the input is: 12.0
Program Specifications Write a program to calculate the cost to paint a wall. Amount of required paint is based on the wall area. Total cost includes paint and sales tax. Note: This program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only a portion of tests pass after each step but confirm progress. Step 1 (2 pts). Read from input wall height, wall width, and cost of one paint can (floats). Calculate and output the wall's area to one decimal place using print (f"Wall area: {wall_area:.1f} sq ft");. Submit for grading to confirm 1 test passes. Ex: If the input is: 12.0
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Concept explainers
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Question

Transcribed Image Text:Program Specifications Write a program to calculate the cost to paint a wall. Amount of required paint is based on the wall area. Total cost
includes paint and sales tax.
Note: This program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only
a portion of tests pass after each step but confirm progress.
Step 1 (2 pts). Read from input wall height, wall width, and cost of one paint can (floats). Calculate and output the wall's area to one
decimal place using print (f"Wall area: {wall_area:.1f} sq ft");. Submit for grading to confirm 1 test passes.
Ex: If the input is:
12.0
15.0
29.95
the output is:
Wall area: 180.0 sq ft
Step 2 (2 pts). Calculate and output the amount of paint needed to three decimal places. One gallon of paint covers 350 square feet.
Submit for grading to confirm 2 tests pass.
Ex: If the input is:
12.0
15.0
29.95
the output is:
Wall area: 180.0 sq ft
Paint needed: 0.514 gallons
Step 3 (2 pts). Calculate and output the number of 1 gallon cans needed to paint the wall. Extra paint may be left over. Hint: Use ceil( from
the math module to round up to the nearest gallon (int). Submit for grading to confirm 4 tests pass.
Ex: If the input is:
12.0
15.0
29.95
the output is:
Wall area: 180.0 sq ft
Paint needed: 0.5142 gallons
Cans needed: 1 can (s)
Step 4 (4 pts). Calculate and output the paint cost, sales tax of 7%, and total cost. Dollar values are output with two decimal places. Submit
for grading to confirm all tests pass.

Transcribed Image Text:Step 4 (4 pts). Calculate and output the paint cost, sales tax of 7%, and total cost. Dollar values are output with two decimal places. Submit
for grading to confirm all tests pass.
Ex: If the input is:
8.0
8.0
49.20
the output is:
Wall area: 64.0 sq ft
Paint needed: 0.183 gallons
Cans needed: 1 can (s)
Paint cost: $49.20
Sales tax: $3.44
Total cost: $52.64
461710.3116374.qx3zqy7
LAB
ACTIVITY
3.18.1: LAB*: Program: Painting a wall
1 from math import ceil
2
3 # Type your code here.
main.py
# needed in Step #3
0/10
Load default template...
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education