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 radius of cylinder: 12
Total surface area =  1809.56

 

Insert height of cylinder: 5
Insert radius of cylinder: 3
Total surface area =  150.8