Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In python 3 18 Write a python program with appropriate comments that creates customers' bills for a carpet company when given the following information: a.

In python 3image text in transcribed

18 Write a python program with appropriate comments that creates customers' bills for a carpet company when given the following information: a. The length and the width of the carpet in feet b. The carpet price per square foot c. The per cent discount for each customer d. The labor cost is fixed at $0.35 per square foot and is to be defined as a constant The tax rate is 8.5% applied after the discount. It is also to be defined as a constant. The input data consist of a set of three integers representing the length and width of the room to be carpeted, the percentage of the discount the owner gives to a customer, and a real number representing the unit price of the carpet. The program is to prompt the user for this input as shown below. Length of room (feet)? Width of room (feet)? Customer discount (percent)? 9 Cost per square foot (000 ? 8.23 The program's desim should use main function and at least the six functions described below: a. Read data from the keyboard. This function is used to read all data and place them in the variables b. Calculate values. This function calls three sub-functions, each function is used to store their results. Calculate the installed price. This function calculates area, carpet cost, labor cost, and installed price. The installed price is the cost of the carpet and the cost of the labor. Calculate the subtotal. This function calculates the discount and subtotal. Calculate the total price with discount and tax. This function calculates the tax and the total price. c. Print the result. Use two sub-functions to print the results: one to print the measurements, and one to print the charges. Use the following test sets to test your program. TEST LENGTH WIDTH DISCOUNT COST 1 23 13 12 $14.20 3580 $ 8.00 14 11 10 $22.25 Output Template (align all decimal points): MEASUREMENT Length Xxx A Width Area XOOX square ft DESCRIPTION CHARGES COST SOFT. CHARGE Carpet Labor 0.35 NORTH AMERICAN UNIVERSITY COMP 1411 - Introduction to CSI Assignment #2 Date: Name: $xxxxxx INSTALLED PRICE Discount SUBTOTAL TOTAL Tac

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

Database Systems For Advanced Applications Dasfaa 2023 International Workshops Bdms 2023 Bdqm 2023 Gdma 2023 Bundlers 2023 Tianjin China April 17 20 2023 Proceedings Lncs 13922

Authors: Amr El Abbadi ,Gillian Dobbie ,Zhiyong Feng ,Lu Chen ,Xiaohui Tao ,Yingxia Shao ,Hongzhi Yin

1st Edition

3031354141, 978-3031354144

Students also viewed these Databases questions