how do you slove lesson 7 on code course 2 stage 7 puzzle 9

by Joshua Heidenreich 4 min read

Magic Squares

Have you ever seen a magician? Maybe you've seen one on TV or at a party. Well, there is a certain type of square that is magic in another way. It doesn't turn into anything or disappear, but it has a magic pattern that helps you find the answer.

Solving 3 x 3 Magic Squares

Looks like it might be difficult, but if you know the secret, you can make and solve any 3 x 3 magic square.

Hint

Test it out with only ten lockers and ten students and see if you can find a pattern.

Solution

The principal only needs to close the lockers whose numbers are perfect squares. This means the solution is as easy as finding the square root of the highest possible perfect square within 1000.