Adding code to magic_square.py