Return the turtle's x coordinate. No arguments. Example (for a Turtle instance named turtle): >>> reset() >>> turtle.left(60) >>> turtle.forward(100) >>> print turtle.xcor() 50.0
(self)
| 1611 | return self._position |
| 1612 | |
| 1613 | def xcor(self): |
| 1614 | """ Return the turtle's x coordinate. |
| 1615 | |
| 1616 | No arguments. |
| 1617 | |
| 1618 | Example (for a Turtle instance named turtle): |
| 1619 | >>> reset() |
| 1620 | >>> turtle.left(60) |
| 1621 | >>> turtle.forward(100) |
| 1622 | >>> print turtle.xcor() |
| 1623 | 50.0 |
| 1624 | """ |
| 1625 | return self._position[0] |
| 1626 | |
| 1627 | def ycor(self): |
| 1628 | """ Return the turtle's y coordinate |