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)
| 1780 | return self._position |
| 1781 | |
| 1782 | def xcor(self): |
| 1783 | """ Return the turtle's x coordinate. |
| 1784 | |
| 1785 | No arguments. |
| 1786 | |
| 1787 | Example (for a Turtle instance named turtle): |
| 1788 | >>> reset() |
| 1789 | >>> turtle.left(60) |
| 1790 | >>> turtle.forward(100) |
| 1791 | >>> print(turtle.xcor()) |
| 1792 | 50.0 |
| 1793 | """ |
| 1794 | return self._position[0] |
| 1795 | |
| 1796 | def ycor(self): |
| 1797 | """ Return the turtle's y coordinate |
no outgoing calls