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.00, 40.00)
(self, y)
| 1707 | self._goto(Vec2D(x, self._position[1])) |
| 1708 | |
| 1709 | def sety(self, y): |
| 1710 | """Set the turtle's second coordinate to y |
| 1711 | |
| 1712 | Argument: |
| 1713 | y -- a number (integer or float) |
| 1714 | |
| 1715 | Set the turtle's first coordinate to x, second coordinate remains |
| 1716 | unchanged. |
| 1717 | |
| 1718 | Example (for a Turtle instance named turtle): |
| 1719 | >>> turtle.position() |
| 1720 | (0.00, 40.00) |
| 1721 | >>> turtle.sety(-10) |
| 1722 | >>> turtle.position() |
| 1723 | (0.00, -10.00) |
| 1724 | """ |
| 1725 | self._goto(Vec2D(self._position[0], y)) |
| 1726 | |
| 1727 | def distance(self, x, y=None): |
| 1728 | """Return the distance from the turtle to (x,y) in turtle step units. |
no test coverage detected