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)
| 1689 | self.setheading(0) |
| 1690 | |
| 1691 | def setx(self, x): |
| 1692 | """Set the turtle's first coordinate to x |
| 1693 | |
| 1694 | Argument: |
| 1695 | x -- a number (integer or float) |
| 1696 | |
| 1697 | Set the turtle's first coordinate to x, leave second coordinate |
| 1698 | unchanged. |
| 1699 | |
| 1700 | Example (for a Turtle instance named turtle): |
| 1701 | >>> turtle.position() |
| 1702 | (0.00, 240.00) |
| 1703 | >>> turtle.setx(10) |
| 1704 | >>> turtle.position() |
| 1705 | (10.00, 240.00) |
| 1706 | """ |
| 1707 | self._goto(Vec2D(x, self._position[1])) |
| 1708 | |
| 1709 | def sety(self, y): |
| 1710 | """Set the turtle's second coordinate to y |