8. Python Program to find the Volume of a Cylinder.
How does this program work?
- In this program you will learn about how to calculate Volume of a Cylinder using Python.
- This program requires the user input to enter the radius and height of a Cylinder.
- Finally, we get the volume of a cylinder by using volume formula.
Here is the code
pi = 3.14
radius = int(input('Enter the radius of a cylinder: '))
height = int(input('Enter the height of a cylinder: '))
#Formula for Volume of Cylinder
volume = pi * radius * radius * height
print(" Volume of a cylinder: " ,volume)