human
Magic Square | Even Order | Function for calculating Magic square.
2 - D matrix with all entries as 0.
Change value of array elements at fix location as per the rule ( n * n + 1 ) - arr [ i ] [ [ j ] Corners of order ( n / 4 ) * ( n / 4 ) Top left corner.
Top right corner.
Bottom Left corner.
Bottom Right corner.
Centre of matrix , order ( n / 2 ) * ( n / 2 ).
Printing the square.
Driver Program.
Function call"
Solution in Python:

Write me a code to magic Square and the other steps required?
assistant
#Here is code to magic Square and the other steps required.
 def DoublyEven ( n ) :
	arr = [ [ ( n * y ) + x + 1 for x in range ( n ) ] for y in range ( n ) ]
	for i in range ( 0 , n / 4 ) :
		for j in range ( 0 , n / 4 ) :
			arr [ i ] [ j ] = ( n * n + 1 ) - arr [ i ] [ j ] ;
	for i in range ( 0 , n / 4 ) :
		for j in range ( 3 * ( n / 4 ) , n ) :
			arr [ i ] [ j ] = ( n * n + 1 ) - arr [ i ] [ j ] ;
	for i in range ( 3 * ( n / 4 ) , n ) :
		for j in range ( 0 , n / 4 ) :
			arr [ i ] [ j ] = ( n * n + 1 ) - arr [ i ] [ j ] ;
	for i in range ( 3 * ( n / 4 ) , n ) :
		for j in range ( 3 * ( n / 4 ) , n ) :
			arr [ i ] [ j ] = ( n * n + 1 ) - arr [ i ] [ j ] ;
	for i in range ( n / 4 , 3 * ( n / 4 ) ) :
		for j in range ( n / 4 , 3 * ( n / 4 ) ) :
			arr [ i ] [ j ] = ( n * n + 1 ) - arr [ i ] [ j ] ;
	for i in range ( n ) :
		for j in range ( n ) :
			print ' % 2d ▁ ' % ( arr [ i ] [ j ] ) ,
		print
n = 8
DoublyEven ( n )