Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE PYTHON PLEASE, THANK YOU John is planning to replace carpet for her apartment. Write a program to help her calculate the cost for replacing

USE PYTHON PLEASE, THANK YOU

John is planning to replace carpet for her apartment. Write a program to help her 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}').

This steps below are provided to help you incrementally develop the program. Type your complete code in the code cell following the instructions below.

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.

Calculate the labor cost for installation ($0.75 per actual square foot). Output labor cost.

Calculate sales tax (7%) on carpet and labor cost. Total cost includes carpet, labor and sales tax.

Repeat steps 1-3 including additional input for a second order (one order per line). Maintain total sales for both orders. Output information for each order with a heading and then total sales for both orders.

Point values:

User inputs: 10 POINTS

Calculate labor and installation costs: 6 POINTS

Calculate sales tax: 4 POINTS

Correct outputs for both orders: 8 POINTS

A sample run of this program looks like the following:

What is the carpet price per square foot? .95

What is the width of the room (in feet)? 12

What is the length of the room (in feet)? 12

Order #1

Room: 144 sq ft

Carpet: $164.16

Labor: $108.00

Tax: $19.05

---------------

Cost: $291.21

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions