Question 1:
Modified Random Walks: In the class RandomWalk, x_step and y_step are generated from the same set of conditions.
The direction is chosen randomly from the list [1, -1] and the distance from the list [0, 1, 2, 3, 4]. Modify the values in these lists to see what happens to the overall shape of your walks. Try a longer list of choices for the distance, such as 0 through 8, or remove the −1 from the x or y direction list.
Question 2:
Refactoring: The method fill_walk() is lengthy. Create a new method called get_step() to
determine the direction and distance for each step, and then calculate the step. You should end up with two calls to get_step() in fill_walk(): x_step = get_step() y_step = get_step() This refactoring should reduce the size of fill_walk() and make the method easier to read and understand.
Question 3:
Automatic Labels: Modify die.py and dice_visual.py by replacing the list we used to set the value of hist.x_labels with a loop to generate this list automatically. If you’re comfortable with list comprehensions, try replacing the other for loops in die_visual.py and dice_visual.py with comprehensions as well.
Solutions will be answered if expert see the question and anyone visiting this site can answer.