Question: #You need to debug and modify the program so that it is able to do random walking import random N = 1 0 FILLER =
#You need to debug and modify the program so that it is able to do random walking
import random
N
FILLER
#create a list to represent a row
#The row at first is filled with FILLER
line
for i in rangeN:
line.appendFILLER
#create a matrix
#The matrix is the maze to walk
a
for i in rangeN:
line line:
aappendline
#always starts at the left top corner of the matrix
#fill the matrix cell at the left top corner A
x
y
letter A
axy letter
#a sequence of random walk steps
#The below loop will settle the next letter
letter chrordletter
#The following loop broken due to
#running out of letters
while letter Z:
#find xy for the current letter
#check the interative book chapter random module for methods to use
#update the letter to present
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
