human
Sum of middle row and column in Matrix | Python program to find sum of middle row and column in matrix.
loop for sum of row.
loop for sum of column.
Driver code"
Solution in Python:
 ... Give me a code to sum of middle row and column in Matrix and the other steps required?
assistant
#Here is code to sum of middle row and column in Matrix and the other steps required.
 def middlesum ( mat , n ) :
	row_sum = 0
	col_sum = 0
	for i in range ( n ) :
		row_sum += mat [ n // 2 ] [ i ]
	print ( " Sum ▁ of ▁ middle ▁ row ▁ = ▁ " , row_sum )
	for i in range ( n ) :
		col_sum += mat [ i ] [ n // 2 ]
	print ( " Sum ▁ of ▁ middle ▁ column ▁ = ▁ " , col_sum )
mat = [ [ 2 , 5 , 7 ] , [ 3 , 7 , 2 ] , [ 5 , 6 , 9 ] ]
middlesum ( mat , 3 )