chance you might imagine random walk as the path an ant would take if it had lost its mind and took every step in random direction random walks have practical applications in naturephysicsbiologychemistryand economics for examplea pollen grain floating on drop of water moves across the surface of the water because it is constantly being pushed around by water molecules molecular motion in water drop is randomso the path pollen grain traces out on the surface is random walk the code we're about to write models many real-world situations creating the randomwalk(class to create random walkwe'll create randomwalk classwhich will make random decisions about which direction the walk should take the class needs three attributesone variable to store the number of points in the walk and two lists to store the xand -coordinate values of each point in the walk we'll use only two methods for the randomwalk classthe __init__(method and fill_walk()which will calculate the points in the walk let' start with __init__(as shown hererandom_ from random import choice walk py class randomwalk()""" class to generate random walks "" def __init__(selfnum_points= )"""initialize attributes of walk ""self num_points num_points all walks start at ( self x_values [ self y_values [ to make random decisionswe'll store possible choices in list and use choice(to decide which choice to use each time decision is made we then set the default number of points in walk to --large enough to generate some interesting patterns but small enough to generate walks quickly then at we make two lists to hold the xand -valuesand we start each walk at point ( choosing directions we'll use fill_walk()as shown hereto fill our walk with points and determine the direction of each step add this method to random_walk pyrandom_ walk py def fill_walk(self)"""calculate all the points in the walk "" keep taking steps until the walk reaches the desired length while len(self x_valuesself num_points