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
Microsoft Xbox operating system provides Xbox programmers with a set of common standards to use to access controllers, the Kinec
STatiana [176]

Answer:

e) not be restricted to just Microsoft's platforms.

Explanation:

Microsoft provides the Xbox programmers the with common standards to use that are already set to access controllers which includes kinect motion sensor,save files,play sounds etc.

Kinect sensor consists of following components:

  1. RGB Camera.
  2. 3-D depth sensors.
  3. Motorized tilt.
  4. Multiple microphones.

Without this the games would be run on any platform not just on microsoft platforms like sony's playstation etc.

5 0
4 years ago
PushBullet is an app to talk with people. Look it up and let me know u got it.
lisov135 [29]

Answer:

k

Explanation:

5 0
3 years ago
Read 2 more answers
Although some media critics disagree about the terminology, smartphones and other mobile devices used to watch content originall
GuDViN [60]

Answer:

The correct answer to the following question will be Fourth screens.

Explanation:

In marketing communication and in advertising, fourth screen can be referred to video screen which are small portable such as, smartphones, portable media player and other mobile devices. This type of screen also used to watch those content which are reserved for TV.

Today most of the people use mobile devices for such tasks. Sometimes the third screen also refers for the opening of new possibilities but fourth will widely have used.

Hence, option C is the correct answer.

5 0
3 years ago
Easter Sunday is the first Sunday after the first full moon of spring. To compute the date, you can use this algorithm, invented
tatuchka [14]

Answer:

# The user is prompted to enter the year

# the entered year is assigned to y

y = int(input("Enter the year: "))

# the remainder when y is divided by 19 is assigned to a

a = y % 19

# The quotient is assigned to b when y is divided by 100

b = y // 100

# The remainder is assigned to c when y is divided by 100

c = y % 100

# The quotient is assigned to d when b is divided by 4

d = b // 4

# The remainder is assigned to e when b is divided by 4

e = b % 4

# The quotient is assigned to g when 8 * b + 13 is divided by 25

g = (8 * b + 13) // 25

# The remainder is assigned to h when 19 * a + b - d - g + 15 is divided by 30

h = (19 * a + b - d - g + 15) % 30

# The quotient is assigned to j when c is divided by 4

j = c // 4

# The remainder is assigned to k when c is divided by 4

k = c % 4

# The quotient is assigned to m when a + 11 * h is divided by 319

m = (a + 11 * h) // 319

# The remainder is assigned to r when 2 * e + 2 * j - k - h + m + 32 is divided by 7

r = (2 * e + 2 * j  - k - h + m + 32) % 7

# The quotient is assigned to n when h - m + r + 90 is divided by 25

n = (h - m + r + 90) // 25

# The remainder is assigned to p when h - m + r + n + 19 is divided by 32

p = (h - m + r + n + 19) % 32

# The date of easter is displayed

print ("Easter falls on day ", p, "of month ", n);

Explanation:

The code is written in Python and is well commented. A sample image of program output is attached.

5 0
4 years ago
What is the max theoretical throughput of the 802.11ac wireless technology when using wave 1 devices?​?
quester [9]
Answer is 1.3 Gbps

When using wave 1 devices, the physical rate or the maximum theoretical throughput is 1.3 Gbps. Wave 1 products have been used for about two and a half years now. It has however been overtaken by wave 2 devices which builds upon Wave 1 and supports speeds of up to 2.34 Gbps  up from 1.3 Gbps in the 5 Ghz band.




3 0
3 years ago
Other questions:
  • Can a computer evaluate an expression to something between true and false? Can you write an expression to deal with a "maybe" an
    13·2 answers
  • *Could someone please help me with this***
    5·1 answer
  • You are writing an email to a potentional employer about a job opportunity. What can you do to make sure the email reflects your
    15·2 answers
  • Implement a method called bubbleSort, that takes an ArrayList, sorts it using bubble sort algorithm, and returns a sorted list;
    14·1 answer
  • In chapter 3, we discussed syntax and semantics, in general there are two types of grammars for programming languages, regular a
    14·1 answer
  • Kyle owns a growing delivery business. He would like to buy two more vans but first he needs to figure out related costs and his
    10·2 answers
  • Write a half page summary on how to clean a Gaming PC properly.
    14·1 answer
  • Which of these is NOT a reason for an IP Address?
    15·2 answers
  • Which requires large computer memory?
    15·1 answer
  • Explain employment opportunities in the networking field 
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!