Set the turtle's first coordinate to x Argument: x -- a number (integer or float) Set the turtle's first coordinate to x, leave second coordinate unchanged. Example (for a Turtle instance named turtle): >>> turtle.position() (0.00, 240.00)
(self, x)
| 1858 | self.setheading(0) |
| 1859 | |
| 1860 | def setx(self, x): |
| 1861 | """Set the turtle's first coordinate to x |
| 1862 | |
| 1863 | Argument: |
| 1864 | x -- a number (integer or float) |
| 1865 | |
| 1866 | Set the turtle's first coordinate to x, leave second coordinate |
| 1867 | unchanged. |
| 1868 | |
| 1869 | Example (for a Turtle instance named turtle): |
| 1870 | >>> turtle.position() |
| 1871 | (0.00, 240.00) |
| 1872 | >>> turtle.setx(10) |
| 1873 | >>> turtle.position() |
| 1874 | (10.00, 240.00) |
| 1875 | """ |
| 1876 | self._goto(Vec2D(x, self._position[1])) |
| 1877 | |
| 1878 | def sety(self, y): |
| 1879 | """Set the turtle's second coordinate to y |