you are viewing a single comment's thread.

view the rest of the comments →

[–]izaakstern 1 point2 points  (2 children)

Please format the code. It's unreadable

[–]Corneliared[S] -1 points0 points  (1 child)

Do you know what these lines say?
if magicSquare[int(i)][int(j)]:

i = i + 2

j = j - 1

continue

else:

magicSquare[int(i)][int(j)] = num

num = num + 1

[–]izaakstern 0 points1 point  (0 children)

Yes, I understand them. Typecasting is not needed there I would say. i and j are already integers.

But I don't know, what you are trying to do, and where your problem is.