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

Method sety

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

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.

(self, y)

Source from the content-addressed store, hash-verified

1809 self._goto(Vec2D(x, self._position[1]))
1810
1811 def sety(self, y):
1812 """Set the turtle's second coordinate to y
1813
1814 Argument:
1815 y -- a number (integer or float)
1816
1817 Set the turtle's first coordinate to x, second coordinate remains
1818 unchanged.
1819
1820 Example (for a Turtle instance named turtle):
1821 >>> turtle.position()
1822 (0.00, 40.00)
1823 >>> turtle.sety(-10)
1824 >>> turtle.position()
1825 (0.00, -10.00)
1826 """
1827 self._goto(Vec2D(self._position[0], y))
1828
1829 def distance(self, x, y=None):
1830 """Return the distance from the turtle to (x,y) in turtle step units.

Callers 7

pushMethod · 0.80
popMethod · 0.80
insertMethod · 0.80
__init__Method · 0.80
shiftMethod · 0.80
pushMethod · 0.80
popMethod · 0.80

Calls 2

_gotoMethod · 0.95
Vec2DClass · 0.85

Tested by

no test coverage detected