Question: pythom Program Specifications Write a program to calculate the cost for replacing carpet for a single room. Carpet is priced by square foot. Total cost

pythom
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 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 the carpet price per 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. Submit for grading to confirm 1 test passes.
Ex: If the input is:
1.101512
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. Submit for grading to confirm 2 tests pass.
Ex: If the input is:
0.951016
the output is:
Room: 160 sq ft Carpet: $182.40

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!