Exercise idea: Magic square
This could be declined in multiple ways:
- Given a numpy array prefilled with a few values, and the expected sum for all lines and columns, fill the array with the missing values.
- Given a numpy array prefilled with a few values, and given the individual sums expected for every column and every lines, fill the array with the missing values.
- The same within an hexagonal grid instead of a 2d grid.
- Given a magic hexagon with some missing values, fill it.
- ...