Magic square An example of how to represent a problem An idea from Chris Beck put a number in each square each number is different a number is in the range 1 to 16 the sum…