#
#  Simple python random walk in 1D
#  Performs and plots up to 5 random walks
#
import random
import numpy as np
import matplotlib.pyplot as plt

def random_walk(steps):
    """  Performs 1D random walk with number steps = steps """
#######################################################
#   YOUR CODE GOES HERE: complete this function
#   or better: copy in code that worked for last program
#
#######################################################
    return walk
#
#   Enter number of walks to plot 
#
###############################################
#   YOUR CODE GOES HERE:
#     Add line to enter number of walks to do (num_walks).
#        Print message and force re-entry if <1 or >5
#
#     Add line to enter number of steps(num_steps) in each walk
#########################################################
#
#  Allows each walk to use a different color/line type on plot 
line_type = ['r-','b-','k-','g-','m-']
#
#  Perform random walk and plot result for each walk
# 
####################################################
#
#   YOUR CODE GOES HERE !!
#   Hint: Use for loop to execute and plot each walk 
#
#####################################################
#
#  Set plot title , legend, and grid 
#
plt.title('One-dimensional random walks(' + str(num_walks) + ')' )
plt.legend(loc="upper left")
plt.grid(True)
plt.show() 

