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)
| 1876 | self._goto(Vec2D(x, self._position[1])) |
| 1877 | |
| 1878 | def sety(self, y): |
| 1879 | """Set the turtle's second coordinate to y |
| 1880 | |
| 1881 | Argument: |
| 1882 | y -- a number (integer or float) |
| 1883 | |
| 1884 | Set the turtle's first coordinate to x, second coordinate remains |
| 1885 | unchanged. |
| 1886 | |
| 1887 | Example (for a Turtle instance named turtle): |
| 1888 | >>> turtle.position() |
| 1889 | (0.00, 40.00) |
| 1890 | >>> turtle.sety(-10) |
| 1891 | >>> turtle.position() |
| 1892 | (0.00, -10.00) |
| 1893 | """ |
| 1894 | self._goto(Vec2D(self._position[0], y)) |
| 1895 | |
| 1896 | def distance(self, x, y=None): |
| 1897 | """Return the distance from the turtle to (x,y) in turtle step units. |