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

Method forward

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

Move the turtle forward by the specified distance. Aliases: forward | fd Argument: distance -- a number (integer or float) Move the turtle forward by the specified distance, in the direction the turtle is headed. Example (for a Turtle ins

(self, distance)

Source from the content-addressed store, hash-verified

1615 self._position = end
1616
1617 def forward(self, distance):
1618 """Move the turtle forward by the specified distance.
1619
1620 Aliases: forward | fd
1621
1622 Argument:
1623 distance -- a number (integer or float)
1624
1625 Move the turtle forward by the specified distance, in the direction
1626 the turtle is headed.
1627
1628 Example (for a Turtle instance named turtle):
1629 >>> turtle.position()
1630 (0.00, 0.00)
1631 >>> turtle.forward(25)
1632 >>> turtle.position()
1633 (25.00,0.00)
1634 >>> turtle.forward(-75)
1635 >>> turtle.position()
1636 (-50.00,0.00)
1637 """
1638 self._go(distance)
1639
1640 def back(self, distance):
1641 """Move the turtle backward by distance.

Callers 14

dotMethod · 0.45
designMethod · 0.45
wheelMethod · 0.45
pentpieceMethod · 0.45
pentlMethod · 0.45
pentrMethod · 0.45
tripolyrMethod · 0.45
tripolylMethod · 0.45
centerpieceMethod · 0.45
treeFunction · 0.45
maketreeFunction · 0.45
randomfdFunction · 0.45

Calls 1

_goMethod · 0.95

Tested by

no test coverage detected