Program to find Surface Area and Volume of Octagonal Prism | Python3 program to find the Surface area and volume of octagonal prism ; Function to find the Volume of octagonal prism ; Formula to calculate volume = ( area * h ) ; Display volume ; Function to find the surface area of octagonal prism ; Formula to calculate Surface area ; Driver Code
import math NEW_LINE def find_volume ( area , h ) : NEW_LINE INDENT Volume = ( area * h ) NEW_LINE print ( " Volume : ▁ " , end = " ▁ " ) NEW_LINE print ( Volume ) NEW_LINE DEDENT def find_Surface_area ( area , a , h ) : NEW_LINE INDENT Surface_area = ( 2 * area ) + ( 8 * a * h ) NEW_LINE print ( " Surface ▁ area : ▁ " , end = " ▁ " ) NEW_LINE print ( Surface_area ) NEW_LINE DEDENT h = 1 NEW_LINE a = 6 NEW_LINE d = 2 NEW_LINE area = 2 * a * d NEW_LINE find_Surface_area ( area , a , h ) NEW_LINE find_volume ( area , h ) NEW_LINE