Python Only**
use fruitful branching recursion
Part A: curl {#partA .collapse}
The curl function draws a spiral shape consisting of lines whose lengths change according to a fixed ratio, with angles between them which also change along the length of the spiral. It must also return the total length of the curl. These curl examples show some of the different possibilities. It uses five parameters:
The length of the first line in the pattern.
The ratio between the length of each line and the next one. Multiply the current length by this ratio to get the next length.
The angle to turn (to the right) before drawing the next line.
The amount by which the turn angle should increase at each step. Add this to the current turn angle to get the turn angle used after the next line (the turn angle after the current line does not incorporate this value). For example, if the curl angle is 30 and the increase is 10, after drawing one line the turtle will turn 30 degrees to the right, and the curl angle argument to the recursive call will be 40 (while the increase amount for the recursive call will remain 10).
The number of lines to draw.
The function may not use any loops and must be recursive. For full credit, there should only be one recursive call. Your function must also return the turtle back to where it started when it is done.
Define curl with 5 parameters
Use def to define curl with 5 parameters
Do not use any kind of loop
Within the definition of curl with 5 parameters, do not use any kind of loop.
Call curl
Within the definition of curl with 5 parameters, call curl in at least one place.