Question: Write a simple code in Python that determines if a 2D array represents a magic square. A magic square is an n-by-n square array of
Write a simple code in Python that determines if a 2D array represents a magic square. A magic square is an n-by-n square array of distinct positive integers from 1 to n2 where each row, column and main diagonal has the same sum.
I haven't learned numpy, zip, or anything complicated... it's expected that I use for loops and recursion and such.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
