programming problems fig tree write recursive function that takes string like "abcdefghand returns "badcfehgcall this function swap since it swaps every two elements of the original string put this function in program and call it with at least few test cases write recursive function that draws tree call your function drawbranch pass it turtle to draw withan angleand the number of littler branches to draw like the tree that appears in fig each time you recursively call this function you can decrease the number of branches and the angle each littler branch is drawn at some angle from the current branch so your function can change the angle of the turtle by turning left or right when your number of branches gets to zeroyou can draw leaf as little green square if you make the width of the turtle line thicker for bigger branches and smaller for littler branchesyou'll get nice tree you might write one more function called drawtree that will set up everything (except the turtleto draw nice tree put this function in program that draws at least one tree hintin your drawbranch functionafter you have drawn the branch (and all sub-branchesyou will want to return the turtle to the original position and direction you started at this is necessary so after calling drawbranch you will know where the turtle is located if you don' return it to its original positionthe turtle will end up stranded out at leaf somewhere write recursive function that draws circular spiral to do thisyou'll need to use polar coordinates polar coordinates are way of specifying any point in the plane with an angle and radius zero degrees goes to the right and the angles go counter-clockwise in circle with an angle and radiusany point in the plane can be described to convert an angleaand radiusrfrom polar coordinates to cartesian coordinates you would use sine and cosine you must import the math module then math cos (aand math sin (athis copy belongs to 'acha