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
WILLL PAYYYYYYYY
Nonamiya [84]
I believe it would be Use the reports wizard to create a report.
6 0
4 years ago
Which of the following processes is not part of the rock cycle?
Leviafan [203]
Igneous rock forced below the Earth's surface where it is turned into sedimentary rock through intense heat and pressure.

This process creates metamorphic rocks, not sedimentary.
3 0
4 years ago
Countdown until matching digits Write a program that takes in an integer in the range 11-100 as input. The output is a countdown
Dovator [93]

Answer:

The program in C is as follows:

#include <stdio.h>

int main(){

   int n;

   scanf("%d", &n);

   if(n<11 || n>100){

       printf("Input must be between 11 - 100");    }

   else{

       while(n%11 != 0){

           printf("%d ", n);

           n--;        }

       printf("%d ", n);    }

   return 0;

}

Explanation:

The existing template can not be used. So, I design the program from scratch.

This declares the number n, as integer

   int n;

This gets input for n

   scanf("%d", &n);

This checks if input is within range (11 - 100, inclusive)

   if(n<11 || n>100){

The following prompt is printed if the number is out of range

       printf("Input must be between 11 - 100");    }

   else{

If input is within range, the countdown is printed

       while(n%11 != 0){ ----This checks if the digits are identical using modulus 11

Print the digit

           printf("%d ", n);

Decrement by 1

           n--;        }

This prints the last expected output

       printf("%d ", n);    }

4 0
3 years ago
Which statement best defines the Control Pannel?
victus00 [196]
The Control Panel is a component of Microsoft Windows that provides the ability to view and change system settings. It consists of a set of applets that include adding or removing hardware and software, controlling user accounts, changing accessibility options, and accessing networking settings.
4 0
3 years ago
What is a binary message
noname [10]
Binary SMS messages allow sending of various types of rich-content, such as transfering ringtones, telphone system settings and WAP-Push via text messaging. Any binary SMS message has 140 bytes of data which can be used. This data is split into two distinct parts - the user data header (UDH) and the message data.
4 0
3 years ago
Read 2 more answers
Other questions:
  • Jerry suspects that information about his internet usage was sent to external websites without his knowledge. He is wary about t
    7·1 answer
  • What is a teaser and what is an audience
    5·1 answer
  • What should you do to protect your copyright
    7·1 answer
  • The jaws of ________ chucks are advanced and retracted independently of each other and allow for fine-tuning the position of the
    6·1 answer
  • Seeking additional information is known as _____.
    12·2 answers
  • Select the correct answer.
    9·1 answer
  • 8. Why is it important not to download pictures to your school or workplace network if you do not plan to use them?
    10·1 answer
  • Which mechanical switches are the loudest and clickiest?
    15·1 answer
  • program 2. write a VB.NET program to solve the linear equation of the form Ax+B=C, i.e x=(C=B)/A (Eg:2x+3=7, where B and C are c
    15·1 answer
  • Is anyone else's pa.dl.et not working??? It says The requested URL / was not found on this server. That’s all we know.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!