Take the 5×4 coordinate grid and add a 'mine' column of 0s (safe) and 1s (mine).
Seed with np.random.seed(0) immediately before drawing (inside solve, right
before np.random.binomial: it's global, shared state, so seeding anywhere else
won't reproduce the same numbers), giving each square a 40% chance of being a mine.
Return the DataFrame.
Output
x y mine
0 0 0 0
1 0 1 1
2 0 2 1
3 0 3 0
4 1 0 0
.. .. .. ...
15 3 3 0
16 4 0 0
17 4 1 1
18 4 2 1
19 4 3 1
[20 rows x 3 columns]