178k views
1 vote
How to calculate the the volume and surface area of cylinder in python

1 Answer

2 votes

Answer:

To calculate the volume and surface area of a cylinder in Python, you can use the following code:

#Calculate the volume

volume = 3.14 * radius * radius * height

#Calculate the surface area

surface_area = 2 * 3.14 * radius * (radius + height)

User Tom Boutell
by
7.4k points