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
enyata [817]
2 years ago
8

Write a Python function to determine the volume of material remaining after the hole is drilled. The function should take as inp

ut parameters the length, width and height of the box and the radius of the hole. (You may assume that the measurements are all specified in the same length units.) The function should return the volume of material remaining. The function should check that the dimensions are consistent with reality. For example, the radius of the hole should be less than the minimum of (length/2) and (width/2). If the input data is not consistent, the function should return an appropriate value or otherwise indicate the problem. (It is your choice as to how to handle this. You may want to consider explaining your method for error handling in a docstring.)
Computers and Technology
1 answer:
Andru [333]2 years ago
5 0

Answer:

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

print (height)

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

print (width)

half_width =width/2

half_height=height/2

while 0==0:

   radius = float( input("Enter radius : ") )

   print (radius)

   

   if radius<half_width and radius <half_height:

       break

def remainingVolume(height,width,radius):

       

   vol_box=height*width*width

   print (vol_box)

   vol_hole=3.14178*radius*radius*height

   print (vol_hole)

   

   remaining_vol=vol_box-vol_hole

   print ("Remaining volume is ",remaining_vol)

   

remainingVolume(height,width,radius);

Explanation:

Take input from user for height ,width and radius. To find volume of box formula is vol=height* width*length\\

Let's assume width and length is same so

length= width

Using this formula of box volume find box volume.Now find volume of hole.

Consider hole as small cylinder, find volume of cylinder and subtract from volume of box to get remaining volume of box after hole.

vol_of_cyl=\pi radius^{2} height

You might be interested in
The first project that this position will work on is an embedded sensor that will send readings periodically to the cloud, and h
Mice21 [21]

Answer:

we need PLC(Programmable Logic Units) attached to the sensors  and those sensors will take the signals/values  and transfer them to the cloud .In cloud we store that information and send that information to the web application where user is able to view

Explanation:

it looks like a SCADA system. we can integrate PLC with SCADA

or

for developing PLC we can use c or c++.it contain logic to transfer data to cloud

for cloud storage we can use Microsoft azure which is useful for data storage in sql servers

for web application we can use ASP.Net to interact with cloud and get data from there and display the results to the user on UI

6 0
2 years ago
compare a 4 core processor 1.3ghz 8 megabytes 16ram and 2 terabyte hard drive to a 2 core 3.9 ghz 2 megabyte cache 4gb ram and 2
deff fn [24]

Answer:

answer is in the question

Explanation:

4 0
2 years ago
Fill in the missing step in the following deadlock situation. Two users from the local board of education are each running a pro
Softa [21]

Answer:

b. P2 requests drive 2 and gets it.

Explanation:

Two users from the local board of education are each running a program (P1 and P2), and both programs will eventually need two DVD drives to copy files from one disc to another. Only two DVD-R drives are available and they’re allocated on an "as requested" basis. Soon the following sequence transpires: P2 requests drive 2 and gets it.

7 0
3 years ago
What is the answer for 2.8.10 word games? This is what I have so far, but I can’t seem to be able to figure out the bananaSplit
Feliz [49]

Answer:

 public String bananaSplit(int insertIdx, String insertText) {

     return word.substring(0, insertIdx) + insertText + word.substring(insertIdx);

 }

Explanation:

Do you have the other parts of the WordGames class?

8 0
2 years ago
What number will this code return?<br> Math.max(7, 5, 9);
Anon25 [30]
9

JavaScript’s Math module has a max method that finds the max of the given arguments.

I’m not sure how I can be any clearer
I’ve attached a screenshot if you still have no clue

8 0
1 year ago
Other questions:
  • Jail and prison officials may generally limit inmate rights when the limitations serve
    13·2 answers
  • Match the following.
    8·2 answers
  • Help! live preview in brackets is not working
    8·1 answer
  • What does www stand for?
    10·2 answers
  • Samira works for a large U.S. company that has factories all over the world. Samira returned to the U.S. after visiting several
    9·1 answer
  • Some numbers are formed with closed paths. the digits 0, 4, 6 and 9 each have 1 closed path and 8 has 2. None of the other numbe
    6·1 answer
  • Listening to music on giggl, join!<br><br> link will be in comments, copy and paste
    9·2 answers
  • You implement basic version control and go through the phase of creating a local repository. Initiate the commands to set up tha
    7·1 answer
  • What is modularity?
    9·1 answer
  • HELP ME ILL GIVE BRAINLY Input 50 numbers and then output the average of the negative numbers only. Write in pseudocode!
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!