Cody Bable

Generation

generate functionFri, 28 Apr 2023

create a function to redraw the drawing in turtle from user mouse clicks

def drawLine(x1, y1, x2, y2): t.penup() t.goto(x1, y1) t.pendown() t.goto(x2, y2) def clear(): t.clear() t.reset() t.hideturtle() t.color('black') t.speed(0) def draw(): clear() s.onclick(drawLine) wn.onclick(drawLine)

Questions about programming?Chat with your personal AI assistant