Computer Science, asked by mahimadewangan7, 8 months ago

write a program to find the volume of cube, cuboids, cone and cylinder using a user defined function valume();​

Answers

Answered by mindfulmaisel
2

PYTHON PROGRAM:

Answer:

def volume(a,b,c,d,e,g,r,h):

   volume_of_cube=a*a*a

   volume_of_cuboid=b*c*d

   volume_of_cone=3.14*e*e*g*(1/3)

   volume_of_cylinder=3.14*r*r*h

   print("volume of cube:",volume_of_cube)

   print("volume of cuboid",volume_of_cuboid)

   print("volume of cone",volume_of_cone)

   print("Volume of cylinder",volume_of_cylinder)

radius_of_cube=int(input("Enter the radius of cube:"))

length_of_cuboid=int(input("Enter the length of cuboid:"))

bredth_of_cuboid=int(input("Enter the breadth of cuboid:"))

height_of_cuboid=int(input("Enter the height of cuboid:"))

radius_of_cone=int(input("Enter the radius of cone:"))

height_of_cone=int(input("Enter the height of cone:"))

radius_of_cylinder=int(input("Enter the radius of cylinder:"))

height_of_cylinder=int(input("Enter the height of the cylinder:"))

volume(radius_of_cube,length_of_cuboid,bredth_of_cuboid,height_of_cuboid,radius_of_cone,height_of_cone,radius_of_cylinder,height_of_cylinder)

   

output:

Enter the radius of cube:1

Enter the length of cuboid:1

Enter the breadth of cuboid:1

Enter the height of cuboid:1

Enter the radius of cone:1

Enter the height of cone:1

Enter the radius of cylinder:1

Enter the height of the cylinder:1

volume of cube: 1

volume of cuboid 1

volume of cone 1.0466666666666666

Volume of cylinder 3.14

TO KNOW MORE ON PYTHON PROGRAM

Write python program that accepts marks in 5 subjects and outputs average marks ..

https://brainly.in/question/13526149

Write a Python program to find person is senior citizen or not input page​

https://brainly.in/question/12150015

Similar questions