Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a python program to calculate the cost for replacing carpet for a single room. Carpet is priced by square foot. Total cost includes carpet,

Write a python 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}').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.Calculate the labor cost for installation ($0.75 per actual square foot). Output labor cost. Submit for grading to confirm 2 tests pass.Calculate sales tax (7%) on carpet and labor cost. Total cost includes carpet, labor and sales tax. Output sales tax and total cost. Submit for grading to confirm 3 tests pass. 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. Submit for grading to confirm 4 tests pass.Repeat steps 1-3 including additional input for a third order (one order per line). Maintain total sales for all orders. Output information for each order with a heading and then total sales for all orders. Submit for grading to confirm all tests pass.

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

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

Students also viewed these Databases questions