Python Program to Compute Volume and Surface Area of Cylinder
Write Python Program to Compute Volume and Surface Area of Cylinder
# Python Program to Compute Volume and Surface Area of Cylinder
radius = 4
height = 5
# cylinder area formula
area_cylinder = (2 * PI * radius * height) + (2 * PI * radius * radius)
# cylinder volume formula
volume = ( PI * radius * radius * height)
print("Surface area of Cylinder having radius ", radius, " and height ", height, " :--> ", area_cylinder)
print("Volume of Cylinder having radius ", radius, " and height ", height, " :--> ", volume)
Output:
Surface area of Cylinder having radius 4 and height 5 :--> 226.08
Volume of Cylinder having radius 4 and height 5 :--> 251.20000000000002