human
Program to check if matrix is lower triangular | Function to check matrix is in lower triangular.
Driver function ..
Function call"
Solution in Python:
 Can you provide a code to program to check if matrix is lower triangular and the other steps required?
assistant
#Here is code to program to check if matrix is lower triangular and the other steps required.
 def islowertriangular ( M ) :
	for i in range ( 0 , len ( M ) ) :
		for j in range ( i + 1 , len ( M ) ) :
			if ( M [ i ] [ j ] != 0 ) :
				return False
	return True
M = [ [ 1 , 0 , 0 , 0 ] , [ 1 , 4 , 0 , 0 ] , [ 4 , 6 , 2 , 0 ] , [ 0 , 4 , 7 , 6 ] ]
if islowertriangular ( M ) :
	print ( " Yes " )
else :
	print ( " No " )