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
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.