10182011, 07:35 PM
Your method will only sometimes work. In order to seal all the holes, you'd need to expand the if/else conditional to include all the numbers. If you expand the conditional to have the first sum compared to the other 7 sums (should be a total of 8 comparisons, 7 "and" joiners), it should catch all the unmagic squares. The list is just a neater way to do it, but it's not necessary.
