Cody Bable

Generation

generate functionFri, 28 Apr 2023

create a function to store the mouse clicks and redraw from the mouse clicks in turtle.

def mouse_c(x, y): t.penup() t.goto(x, y) t.pendown() draw_shape() def draw_shape(): for i in range(3): t.forward(100) t.left(120) t.onscreenclick(mouse_c)

Questions about programming?Chat with your personal AI assistant