Set the turtle's second coordinate to y Argument: y -- a number (integer or float) Set the turtle's first coordinate to x, second coordinate remains unchanged. Example (for a Turtle instance named turtle): >>> turtle.position() (0.
(self, y)
| 1809 | self._goto(Vec2D(x, self._position[1])) |
| 1810 | |
| 1811 | def sety(self, y): |
| 1812 | """Set the turtle's second coordinate to y |
| 1813 | |
| 1814 | Argument: |
| 1815 | y -- a number (integer or float) |
| 1816 | |
| 1817 | Set the turtle's first coordinate to x, second coordinate remains |
| 1818 | unchanged. |
| 1819 | |
| 1820 | Example (for a Turtle instance named turtle): |
| 1821 | >>> turtle.position() |
| 1822 | (0.00, 40.00) |
| 1823 | >>> turtle.sety(-10) |
| 1824 | >>> turtle.position() |
| 1825 | (0.00, -10.00) |
| 1826 | """ |
| 1827 | self._goto(Vec2D(self._position[0], y)) |
| 1828 | |
| 1829 | def distance(self, x, y=None): |
| 1830 | """Return the distance from the turtle to (x,y) in turtle step units. |