Cody Bable

Generation

generate functionFri, 28 Apr 2023

create a function to copy turtle coordinates from user mouse clicks on the screen

def copy_turtle(turtle_num): screen = turtle.Screen() screen.setup(800, 800) screen.title("Click to get coordinates") screen.onclick(turtle_num.goto) screen.listen() screen.mainloop() t = turtle.Turtle() t2 = turtle.Turtle() copy_turtle(t2)

Questions about programming?Chat with your personal AI assistant