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,
(self, x)
| 1791 | self.setheading(0) |
| 1792 | |
| 1793 | def setx(self, x): |
| 1794 | """Set the turtle's first coordinate to x |
| 1795 | |
| 1796 | Argument: |
| 1797 | x -- a number (integer or float) |
| 1798 | |
| 1799 | Set the turtle's first coordinate to x, leave second coordinate |
| 1800 | unchanged. |
| 1801 | |
| 1802 | Example (for a Turtle instance named turtle): |
| 1803 | >>> turtle.position() |
| 1804 | (0.00, 240.00) |
| 1805 | >>> turtle.setx(10) |
| 1806 | >>> turtle.position() |
| 1807 | (10.00, 240.00) |
| 1808 | """ |
| 1809 | self._goto(Vec2D(x, self._position[1])) |
| 1810 | |
| 1811 | def sety(self, y): |
| 1812 | """Set the turtle's second coordinate to y |
no test coverage detected