human
Number of triangles formed by joining vertices of n | Function to find the number of triangles.
print the number of triangles having two side common.
print the number of triangles having no side common.
initialize the number of sides of a polygon"
Solution in Python:
assistant
#Here is code to number of triangles formed by joining vertices of n and the other steps required.
 def findTriangles ( n ) :
	num = n
	print ( num , end = " ▁ " )
	print ( num * ( num - 4 ) * ( num - 5 ) // 6 )
n = 6 ;
findTriangles ( n )