Question: Python programming language required!!! In the game of Minesweeper, certain squares in a grid contain mines. If a square does not contain a mine, it
Python programming language required!!!

In the game of Minesweeper, certain squares in a grid contain mines. If a square does not contain a mine, it holds a number from 0-8 showing how many adjacent squares (horizontally, vertically, or diagonally) are mines. Write a program that reads a rectangular grid from standard input. The grid may have any dimensions, and ends when there is no more input to read. Each grid character will be either '*', indicating a mine, or'. ', indicating no mine. The program should write the grid to standard output, replacing each! character with the number of adjacent mines. Sample input: Output: 12321 1***1 13442 01*2*
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
