In a certain game, treasure is hidden in a $10 \times 10$ grid. The grid coordinates are given by grid [row, col] where grid [0,0] represents the top left hand corner and grid[ [9, 9] the bottom right corner. The grid coordinates of the treasure are signified by a 1 at $g r i d[r o w, \operatorname{col}]$. All other grid elements are filled with zeros.
What is the purpose of the following pseudocode algorithm?
for row $=0$ to 9
for col $=0$ to 9
$\quad$ if grid[row, col] == 1 then
print("row ", row, "column ", col)
endif
next col
next row
for row $=0$ to 9
for col = 0 to 9
if grid[row, $c o l]==1$ then
print("row ", row," column ", col)
endif
next col
next row
Write pseudocode statements to initialise the grid and "hide the treasure" at a random location inside the grid.