human
Section formula for 3 D | Function to find the section of the line.
Applying section formula.
Printing result.
Driver code"
How can the above be solved in Python?
 Give me a code to section formula for 3 D and the other steps required?
assistant
#Here is code to section formula for 3 D and the other steps required.
 def section ( x1 , x2 , y1 , y2 , z1 , z2 , m , n ) :
	x = ( ( m * x2 ) + ( n * x1 ) ) / ( m + n )
	y = ( ( m * y2 ) + ( n * y1 ) ) / ( m + n )
	z = ( ( m * z2 ) + ( n * z1 ) ) / ( m + n )
	print ( " ( " , x , " , " , y , " , " , z , " ) " )
if __name__ == ' _ _ main _ _ ' :
	x1 = 2
	x2 = 4
	y1 = - 1
	y2 = 3
	z1 = 4
	z2 = 2
	m = 2
	n = 3
	section ( x1 , x2 , y1 , y2 , z1 , z2 , m , n )