Premium problem51. Minesweeper: Place Mines

Medium Locked

Take the X by Y coordinate grid and add a 'mine' column of 0s (safe) and 1s (mine). Seed with np.random.seed(seed) immediately before drawing (inside solve, right before np.random.binomial: it is global, shared state, so seeding anywhere else will not reproduce the same numbers), giving each square a probability p of being a mine.

Input

X = 5, Y = 4, p = 0.4, seed = 0

Premium problem

This one's part of Premium. Unlock the full Pandas track plus every other premium problem on the site.

Implement solve(...)