MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / pos

Method pos

Python/Turtle.py:1600–1611  ·  view source on GitHub ↗

Return the turtle's current location (x,y), as a Vec2D-vector. Aliases: pos | position No arguments. Example (for a Turtle instance named turtle): >>> turtle.pos() (0.00, 240.00)

(self)

Source from the content-addressed store, hash-verified

1598 self._rotate(angle)
1599
1600 def pos(self):
1601 """Return the turtle's current location (x,y), as a Vec2D-vector.
1602
1603 Aliases: pos | position
1604
1605 No arguments.
1606
1607 Example (for a Turtle instance named turtle):
1608 >>> turtle.pos()
1609 (0.00, 240.00)
1610 """
1611 return self._position
1612
1613 def xcor(self):
1614 """ Return the turtle's x coordinate.

Callers 1

writeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected