Write a function named print_square that takes a two-dimensional list
representing a \(3\) by \(3\) grid of numbers as its argument and prints
the grid showing the numbers in the square. Then write another function named
is_magic that takes a similar two-dimensional list of numbers as its
argument and returns the Boolean value True if the argument represents a Lo
Shu magic square and False otherwise.
Finally, complete the main function of the program to determine if
each of the provided squares are Lo Shu magic squares and display the results.
It might help to write additional functions to check each of the requirements
or handle printing. The provided squares are:
Ensure your program’s output matches the provided samples exactly.
This includes all characters, white space, and punctuation. In the
samples, user input is highlighted like
this for clarity, but your program should not highlight user
input in this way.
Sample Output
$ python3 magic_square_login.pyYour square is: 1 2 3 4 5 6 7 8 9It is not a Lo Shu magic square.
Your square is: 5 5 5 5 5 5 5 5 5It is not a Lo Shu magic square.
Your square is: 4 9 2 3 5 7 8 1 6It is a Lo Shu magic square!
Save your finished program as magic_square_login.py, replacing
login with your Purdue login. Then submit it along with all the
deliverables listed in
Table 7.4 below.