Write Python Code Following Problem Attached Q37068763

Write a python code for the following problem which isattached.PROBLEM 3. walk.py: a 1-dimensional random walk simulator. A one-dimensional random walk for n steps is described as follows.

PROBLEM 3. walk.py: a 1-dimensional random walk simulator. A one-dimensional random walk for n steps is described as follows. Imagine standing on the number line at 0. Now take n steps; for each step, you flip a coin to decide whether to take a step to the left (subtract one) or the right (add one). For example, if you flip heads, heads, tails, heads, tails, you would go right,

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.