Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # turtle library
- import turtle
- #This to make turtle object
- tess=turtle.Turtle()
- # self defined function to print coordinate
- def buttonclick(x,y):
- print("You clicked at this coordinate({0},{1})".format(x,y))
- #onscreen function to send coordinate
- turtle.onscreenclick(buttonclick,1)
- turtle.listen() # listen to incoming connections
- turtle.speed(10) # set the speed
- turtle.done() # hold the screen
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement