human
Give me a code to program for Identity Matrix and the other steps required given the following:
Program for Identity Matrix | Python code to print identity matrix Function to print identity matrix.
Here end is used to stay in same line.
Driver Code"
Solution in Python:
assistant
#Here is code to program for Identity Matrix and the other steps required.
 def Identity ( size ) :
	for row in range ( 0 , size ) :
		for col in range ( 0 , size ) :
			if ( row == col ) :
				print ( "1 ▁ " , end = " ▁ " )
			else :
				print ( "0 ▁ " , end = " ▁ " )
		print ( )
size = 5
Identity ( size )