Number of triangles formed by joining vertices of n | Function to find the number of triangles ; print the number of triangles ;  ; Driver code initialize the number of sides of a polygon
def findTriangles ( n ) : NEW_LINE INDENT num = n * ( n - 4 ) NEW_LINE print ( num ) NEW_LINE DEDENT / * Driver code * / NEW_LINE n = 6 NEW_LINE findTriangles ( n ) NEW_LINE