Cody Bable

Generation

generate functionFri, 28 Apr 2023

create a function to redraw the drawing in turtle

def draw(t, length, n): if n == 0: return angle = 50 t.fd(length*n) t.lt(angle) draw(t, length, n-1) t.rt(2*angle) draw(t, length, n-1) t.lt(angle) t.bk(length*n) draw(bob, length=100, n=4)

Questions about programming?Chat with your personal AI assistant