I am new to Turtle but my general plan to make the spiral is to define a recursive function archSpiral(initialLen, increment, angle, n)
where it does the following sequence n
times:
initialLen
angle
degreesinitialLen
with increment
By repeating this sequence over and over it should be able to create a spiral.
However I'm having trouble putting this process into text and so far I have
def archSpiral(initialLen, increment, angle, n):
for _ in range(n):
turtle.forward(initialLen)
turtle.left(angle)
turtle.foward(initialLen + increment)
But it's not working and I'm stuck here.
Just reiterating what Doyousketch2 said:
def archSpiral(initialLen, increment, angle, n):
for _ in range(n):
turtle.forward(initialLen)
turtle.left(angle)
initialLen += increment