Question: *Problem 1: Carpet Sale Program Specifications Write a program to calculate the cost for replacing carpet for a single room. Carpet is priced by
*Problem 1: Carpet Sale Program Specifications Write a program to calculate the cost for replacing carpet for a single room. Carpet is priced by square foot. Total cost includes carpet, labor and sales tax. Dollar values are output with two decimals. For example, print(f'Cost: ${cost:2f), Note: This program is designed for incremental development. Complete each step, take snapshots of the results, and include them in the final document you submit for grading. Template: import mathi #type your code adding plenty of comments for better understanding of the steps Step 1 (2 pts). Read from input the carpet price pe square foot (float), room width (int) and room length (int). Calculate the room area in square feet. Calculate the carpet price based on square feet with an additional 20% for waste. Output square feet and carpet cost. Ex: If the input is: 1.10 15 12 the output is Room: 180 sq ft Carpet: $237.60 Step 2 (2 pts). Calculate the labor cost for installation ($0.75 per actual square foot). Output labor cost. Ex: If the input is 0.95 10 16 the output is Room: 160 sq ft Carpet: $182.40 Labor: $120.00
Step by Step Solution
3.62 Rating (156 Votes )
There are 3 Steps involved in it
Heres a Python program that calculates the cost for replacing a carpet for a single room following t... View full answer
Get step-by-step solutions from verified subject matter experts
