Calculate volume and surface area of a cone | Python3 program to calculate Volume and Surface area of Cone ; Function to calculate Volume of Cone ; Function To Calculate Surface Area of Cone ; Driver Code ; Printing value of volume and surface area
import math NEW_LINE pi = math . pi NEW_LINE def volume ( r , h ) : NEW_LINE INDENT return ( 1 / 3 ) * pi * r * r * h NEW_LINE DEDENT def surfacearea ( r , s ) : NEW_LINE INDENT return pi * r * s + pi * r * r NEW_LINE DEDENT radius = float ( 5 ) NEW_LINE height = float ( 12 ) NEW_LINE slat_height = float ( 13 ) NEW_LINE print ( " Volume ▁ Of ▁ Cone ▁ : ▁ " , volume ( radius , height ) ) NEW_LINE print ( " Surface ▁ Area ▁ Of ▁ Cone ▁ : ▁ " , surfacearea ( radius , slat_height ) ) NEW_LINE