Python program to Get Total Surface Area of a Cylinder
from math import pi
h = float(input("Insert height of cylinder: "))
r = float(input("Insert radius of cylinder: "))
circles = 2*(pi*r**2)
side = 2*pi*r*h
Area = circles+side
print("Total surface area = ",round(Area,2))
Output:
|
Insert height of cylinder: 12
Insert height of cylinder: 5 |