Python Turtles Part 5 - Detecting turtle's location with xcor and ycor

Опубликовано: 31 Май 2026
на канале: Richard Hunt
1,211
8

You will often need to work out where your turtles are on the screen.
The following two commands are used to find the current x and y coordinates of a turtle:
xcor()
ycor()

Using IF statements will mean you can decide what to do in your program based upon the turtle's location.