MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / setx

Method setx

tools/python-3.11.9-amd64/Lib/turtle.py:1793–1809  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 5

pushMethod · 0.80
_close_gap_from_iMethod · 0.80
_open_gap_from_iMethod · 0.80
insertMethod · 0.80
pushMethod · 0.80

Calls 2

_gotoMethod · 0.95
Vec2DClass · 0.85

Tested by

no test coverage detected