algorithm design and recursion will eventually be tower of size can be moved directly by just moving single diskwe don' need any recursive calls to remove disks above it fixing up our general algorithm to include the base case gives us working movetower algorithm let' code it up in python our movetower function will need parameters to represent the size of the towernthe source postsourcethe destination postdestand the temporary resting posttemp we can use an int for and the strings " ," ,and "cto represent the posts here is the code for movetowerdef movetower(nsourcedesttemp)if = print("move disk from"source"to"dest+"elsemovetower( - sourcetempdestmovetower( sourcedesttempmovetower( - tempdestsourcesee how easy that wassometimes using recursion can make otherwise difficult problems almost trivial to get things startedwe just need to supply values for our four parameters let' write little function that prints out instructions for moving tower of size from post to post def hanoi( )movetower( " "" "" "now we're ready to try it out here are solutions to the threeand four-disk puzzles you might want to trace through these solutions to convince yourself that they work hanoi( move disk from to move disk from to move disk from to move disk from to move disk from to move disk from to move disk from to hanoi( move disk from to move disk from to move disk from to move disk from to move disk from to move disk from to move disk from to