Answered step by step
Verified Expert Solution
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, printfCost: $cost:fRead 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 for waste. Output square feet and carpet cost. Submit for grading to confirm test passes.Calculate the labor cost for installation $ per actual square foot Output labor cost. Submit for grading to confirm tests pass.Calculate sales tax on carpet and labor cost. Total cost includes carpet, labor and sales tax. Output sales tax and total cost. Submit for grading to confirm tests pass. Repeat steps 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 tests pass.Repeat steps 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started