diff options
Diffstat (limited to 'fun_math/random_walk.py')
| -rw-r--r-- | fun_math/random_walk.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fun_math/random_walk.py b/fun_math/random_walk.py new file mode 100644 index 0000000..b425fcb --- /dev/null +++ b/fun_math/random_walk.py @@ -0,0 +1,14 @@ + +import random + + +# N, S, W, E +choices = [(0, 1), (0, -1), (-1, 0), (1, 0)] + + +def rand_walk(n, p0=[]): + if p0 is None: + p0 = [0, 0] + pass + + |
