random walks and more about data vizualization biased random walks now that we have working simulationwe can start modifying it to investigate other kinds of random walks supposefor examplethat we want to consider the behavior of drunken farmer in the northern hemisphere who hates the coldand even in his drunken stupor is able to move twice as fast when his random movements take him in southward direction or maybe phototropic drunk who always moves towards the sun (east in the morning and west in the afternoonthese are all examples of biased random walks the walk is still stochasticbut there is bias in the outcome figure defines two additional subclasses of drunk in each case the specialization involves choosing an appropriate value for stepchoices the function simall iterates over sequence of subclasses of drunk to generate information about how each kind behaves class colddrunk(drunk)def takestep(self)stepchoices [( , )( ,- )( )(- )return random choice(stepchoicesclass ewdrunk(drunk)def takestep(self)stepchoices [( )(- )return random choice(stepchoicesdef simall(drunkkindswalklengthsnumtrials)for dclass in drunkkindsdrunktest(walklengthsnumtrialsdclassfigure subclasses of drunk base class when we ran simall((usualdrunkcolddrunkewdrunk)( ) it printed usualdrunk random walk of steps mean cv max min usualdrunk random walk of steps mean cv max min colddrunk random walk of steps mean cv max min colddrunk random walk of steps mean cv max min ewdrunk random walk of steps mean cv max min ewdrunk random walk of steps mean cv max min