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]
3 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]3 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
And<br>Why the computer is called dilligent<br>Versatile machine?give long answer ​
WITCHER [35]

Answer:

The answer to this question is given below in this explanation section.

Explanation:

"Why the computer is called diligent

Versatile machine"

Computer is called versatile machine because it is used in almost all the fields for various purposes.Because it can perform the task repeatedly without loosing its speed and accuracy for a long time.They are versatile because they can be used for all sorts of task.They can also do many of the same tasks in different ways.Computer is the electronic device which perform the logical and mathematical calculation.Computer is known as the  versatile machine because it is very fast in every field and its part of life without it was cannot imagine life.

It can do the work faster and in every field the computer is used for making their work faster.

It can perform the work fast so it is called versatile machine.

Advantages of versatile machine:

  • Computer are very fast due to which thousand of job can be performed within the short period of time.
  • Complex mathematical problems and logical operations can be solved by using this computer.
  • As computer is versatile device,multiple task like communication,graphics,documentation can be done.

Disadvantages of versatile machine:

  • Computers are machine hence they have no brain so they work according to the program instruction set inside it.
  • It is an electronic deice and it uses electronic sources to work,So it is very risk to store data and information on the computer independently because some electric and electronic damages may damage the data.So we have to make regular backup of the data.

5 0
3 years ago
What is a shortcut for adding a timeline marker
Ludmilka [50]

Answer:

To add a marker to a clip in the Timeline, do the following:

Set up a keyboard shortcut for Add Clip Marker in Edit > Keyboard Shortcuts (Windows), or Premiere Pro > Keyboard Shortcuts (Mac OS).

Select the clip.

Place the Playhead where you want to place the marker.

Press the keyboard shortcut you created for Add Clip Marker.

Explanation:

hope this helps!

5 0
2 years ago
Read 2 more answers
Whereas enterprise network convergence focuses on the consolidation of traditionally distinct voice, video, and data communicati
Vinil7 [7]

Answer: Unified communication

Explanation: Unified communication is the communication technique in which merges various communication routines into a individual business.It works as the phone system which helps in increment of productivity in an organizational business.

The unifying of voice,data/information,video etc is done for optimizing and improving the business that also results in  faster communication rates, secure communication etc.

4 0
3 years ago
What is the service provided by a third party (such as an ISP) that enables you to connect another cloud directly to your Google
Olenka [21]

Answer:

A. Dedicated interconnect

Explanation:

With dedicated interconnect, there is a direct connection between your network and that of Google. It enables you to connect another cloud directly to your Google cloud resources to create hybrid cloud solutions. In other words, Dedicated Interconnect enables hybrid networking. Businesses can now extend their own private cloud into Google's cloud so they can switch control between the two with little latency. This gives them (businesses) control over the amount of data entering into the two clouds.

8 0
4 years ago
The memory management layer is the part of the kernel that serves out all memory allocation requests.
svetlana [45]
Most likely it’s False . But look it up just in case
4 0
3 years ago
Other questions:
  • Run the C-LOOK algorithm (requests can only be serviced when the head is moving toward higher numbered tracks); the head is curr
    12·1 answer
  • The hot wires in a service entrance panel are most likely to be covered with ________ insulation. A. red B. green C. gray D. whi
    14·1 answer
  • The first thing you should select if you're using an Address Block or Greeting Line is
    11·1 answer
  • What determines how a system will work to meet the business needs defined during system investigation?
    13·1 answer
  • Explain URL's parts with the help of an example.​
    10·1 answer
  • What is a quasi vpn?
    14·1 answer
  • You are a network administrator for a company that has two buildings. You are setting up a wireless network so users can maintai
    8·1 answer
  • What is a task that is not associated with loading existing data into a new ERP system.
    11·2 answers
  • Why are Quick Parts useful in an Outlook message?
    5·1 answer
  • What report indicates where users start or exit the conversion funnel?.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!