Question: Greed illimunation program in Python. Please Answer as soon as possible You have an N by N grid of cells. The bottom-left corner is labeled

Greed illimunation program in Python. Please Answer as soon as possible
You have an N by N grid of cells. The bottom-left corner is labeled (1, 1) and the top-right corner is labeled (N, N). Currently, there are Llamps on this grid. The positions of these lamps are recored in the list lamps. Each lamp is located at a distinct cell. Each lamp illuminates all squares that are in the same row, column, or diagonals as the lamp. The lamp is small enough that it will not block illumination from other lamps. All lamps are on by default. For instance, if N = 8, a lamp at cell (3,5) would illuminate all yellow cells in the image below. You are part of a task force that is attempting to investigate how well-lit the grid cells are. If the task force visits a cell, it turns off all lamps that are in that cell or in any adjacent ce to avoid damaging those lamps. Two cells are adjacent if they share an edge or a corner. After the task force turns off all th affected lamps, the task force checks to see if the current gris cell is still illuminated by some lamp, and notes whether the square was illuminated or in darkness. The task force turns on all lamps after completing its investigation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
