1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
enot [183]
3 years ago
15

The third assignment involves writing a Python program to compute the cost of carpeting a room. Your program should prompt the u

ser for the width and length in feet of the room and the quality of carpet to be used. A choice between three grades of carpeting should be given. You should decide on the price per square foot of the three grades on carpet. Your program must include a function that accepts the length, width, and carpet quality as parameters and returns the cost of carpeting that room. After calling that function, your program should then output the carpeting cost.
Your program should include the pseudocode used for your design in the comments. Document the values you chose for the prices per square foot of the three grades of carpet in your comments as well.
You are to submit your Python program as a text file (.txt) file. In addition, you are also to submit a test plan in a Word document or a .pdf file. 15% of your grade will be based on whether the comments in your program include the pseudocode and define the values of your constants, 70% on whether your program executes correctly on all test cases and 15% on the completeness of your test report.
Computers and Technology
1 answer:
mojhsa [17]3 years ago
3 0

Answer:

# price of the carpet per square foot for each quality.

carpet_prices=[1,2,4]

def cal_cost(width,height,choice):

 return width*height*carpet_prices[choice-1]  

width=int(input("Enter Width : "))

height=int(input("Enter Height : "))

print("---Select Carpet Quality---")

print("1. Standard Quality")

print("2. Primium Quality")

print("3. Premium Plus Quality")

choice=int(input("Enter your choice : "))

print(f"Carpeting cost = {cal_cost(width,height,choice)}")

Explanation:

The cal_cost function is used to return the cost of carpeting. The function accepts three arguments, width, height, and the choice of carpet quality.

The program gets the values of the width, height and choice, calls the cal_cost function, and prints out the string format of the total carpeting cost.

You might be interested in
which of these tools stick to the edge of an image, thus making it easy to select the shape of an image
USPshnik [31]

Answer:

ljb lih lug outbpiyougvotvoy

outiyfiyfiyfiyffiyvitfurcutfcutcrcutfutcdu

Explanation:

didn't understand the question

3 0
3 years ago
// This class calculates a waitperson's tip as 15% of the bill public class DebugThree1 { public static void main(String args[])
DENIUS [597]

I added a decimal format to keep all decimals within the hundredths place. I also changed the calcTip method to void and the argument to a double. Void means the method doesn't return anything and changing bill to type double let's us pass numbers with decimals to the calcTip method. I hope this helps!

Download txt
4 0
3 years ago
Assume that a file contains students' ids, full names, and their scores (Assignments grade, quizzes grade,
elixir [45]

Answer:

اope its heمحبعم

Explanation:

3 0
3 years ago
Which SCSI standard allows for the technique known as “hot swapping”? Ultra SCSI Original SCSI Serial SCSI Fast-Wide SCSI
miss Akunina [59]

Answer:

Serial SCSI

Explanation:

Hot swapping can be defined as a process which typically involves fitting or replacing CD-ROM drive, hard-disk drive, power supply or other peripheral devices while a computer system is powered on. Thus, it allows for the installation or removal of a peripheral device from a computer while power is still being supplied to the computer i.e without having to shutdown the computer.

Serial SCSI is a SCSI standard which allows for the technique known as “hot swapping” because it's a point to point connection that is designed to move data to and from computer storage serially.

6 0
3 years ago
Your friend just gave you his old laptop. Whenever you turn on the laptop, though, a black screen appears and asks you to enter
Anastasy [175]

Answer:
C is the answer!

Explanation:

A hard drive contains your operating system which can include your settings and preferences that you included in your device. But it mostly is a storage device so we know it WOULD NOT BE (B.

WOULD NOT BE D beacause powering it back on wouldnt do anything but bring you back to the start.

WOULD NOT BE A beacuse when taking out the battery then putting it back in would just be like turning it off then back on beacuse that just hold the power to a device.

IT WOULD BE C, C IS THE ANSWER beacuse a CMOS batttery contains the main system settings and  also contains information so i think C would be the best answer for this choice.


Hope this helps!
xx <3

7 0
2 years ago
Other questions:
  • Which port-authentication network access control standard forces devices to go through a full authentication, authorization, and
    13·1 answer
  • The velocity dimension of Big Data refers to _____.
    15·1 answer
  • Justin has started a lawn mowing business in his neighborhood. He is running a weed-pulling special this month. What is the most
    8·2 answers
  • What is unique about the TODAY and NOW functions?
    15·2 answers
  • When a chart is selected, numerous customization options can be found on which Chart Tools tabs?
    11·2 answers
  • VEE Physics 2006 E.C
    7·1 answer
  • If a student passes off an author’s work as his or her own, the student has
    6·1 answer
  • Product of -6/13 and reciprocal of -7/16 is ____________​
    7·1 answer
  • Technology __________ guides how frequently technical systems are updated, and how technical updates are approved and funded.
    11·1 answer
  • marion is an iot developer working for a large organization. why does his supervisor want him to stay informed about the network
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!