Surface Area and Volume of Hexagonal Prism | Python3 program to find the Surface Area and Volume of Hexagonal Prism . ; Function to calculate Surface area ; Formula to calculate surface area ; Display surface area ; Function to calculate Volume ; formula to calculate Volume ; Display Volume ; Driver Code ; surface area function call ; volume function call
import math NEW_LINE def findSurfaceArea ( a , h ) : NEW_LINE INDENT Area = 0 ; NEW_LINE Area = ( 6 * a * h + 3 * math . sqrt ( 3 ) * a * a ) ; NEW_LINE print ( " Surface ▁ Area : " , round ( Area , 3 ) ) ; NEW_LINE DEDENT def findVolume ( a , h ) : NEW_LINE INDENT Volume = 0 ; NEW_LINE Volume = ( 3 * math . sqrt ( 3 ) * a * a * h / 2 ) ; NEW_LINE print ( " Volume : " , round ( Volume , 3 ) ) ; NEW_LINE DEDENT a = 5 ; NEW_LINE h = 10 ; NEW_LINE findSurfaceArea ( a , h ) ; NEW_LINE findVolume ( a , h ) ; NEW_LINE