Area of hexagon with given diagonal length | Python3 program to find the area of Hexagon with given diagonal ; Function to calculate area ; Formula to find area ; Driver ode
from math import sqrt NEW_LINE def hexagonArea ( d ) : NEW_LINE INDENT return ( 3 * sqrt ( 3 ) * pow ( d , 2 ) ) / 8 NEW_LINE DEDENT if __name__ == " _ _ main _ _ " : NEW_LINE INDENT d = 10 NEW_LINE print ( " Area ▁ of ▁ hexagon : " , round ( hexagonArea ( d ) , 3 ) ) NEW_LINE DEDENT