Program to calculate Area Of Octagon | Python3 program to find area of octagon ; Utility function ; Driver function
import math NEW_LINE def areaOctagon ( side ) : NEW_LINE INDENT return ( 2 * ( 1 + ( math . sqrt ( 2 ) ) ) * side * side ) NEW_LINE DEDENT side = 4 NEW_LINE print ( " Area ▁ of ▁ Regular ▁ Octagon ▁ = " , round ( areaOctagon ( side ) , 4 ) ) NEW_LINE