def move_tower(heightfrom_poleto_polewith_pole)if height > move_tower(height from_polewith_poleto_polemove_disk(from_poleto_polemove_tower(height with_poleto_polefrom_poledef move_disk(fp,tp)print("moving disk from",fp,"to",tp move_tower( " "" "" "now that you have seen the code for both movetower and movediskyou may be wondering why we do not have data structure that explicitly keeps track of what disks are on what poles here is hintif you were going to explicitly keep track of the disksyou would probably use three stack objectsone for each pole the answer is that python provides the stacks that we need implicitly through the call stack exploring maze in this section we will look at problem that has relevance to the expanding world of roboticshow do you find your way out of mazeif you have roomba vacuum cleaner for your dorm room (don' all college students?you will wish that you could reprogram it using what you have learned in this section the problem we want to solve is to help our turtle find its way out of virtual maze the maze problem has roots as deep as the greek myth about theseus who was sent into maze to kill the minotaur theseus used ball of thread to help him find his way back out again once he had finished off the beast in our problem we will assume that our turtle is dropped down somewhere into the middle of the maze and must find its way out look at figure to get an idea of where we are going in this section to make it easier for us we will assume that our maze is divided up into "squares each square of the maze is either open or occupied by section of wall the turtle can only pass through the open squares of the maze if the turtle bumps into wall it must try different direction the turtle will require systematic procedure to find its way out of the maze here is the procedurefrom our starting position we will first try going north one square and then recursively try our procedure from there if we are not successful by trying northern path as the first step then we will take step to the south and recursively repeat our procedure if south does not work then we will try step to the west as our first step and recursively apply our procedure if northsouthand west have not been successful then apply the procedure recursively from position one step to our east if none of these directions works then there is no way to get out of the maze and we fail nowthat sounds pretty easybut there are couple of details to talk about first suppose we take our first recursive step by going north by following our procedure our next step would exploring maze