Cody Bable

Generation

generate functionFri, 28 Apr 2023

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

def get_coordinates(): pts = [] while True: x, y = turtle.pos() print(x, y) pts.append((x, y)) if turtle.distance(0,0) < 5: break turtle.home() return pts get_coordinates()

Want to kickstart your project?Use the new AI Studio to create your code