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 instance name
(self, distance)
| 1682 | self._position = Vec2D(new_x, new_y) |
| 1683 | |
| 1684 | def forward(self, distance): |
| 1685 | """Move the turtle forward by the specified distance. |
| 1686 | |
| 1687 | Aliases: forward | fd |
| 1688 | |
| 1689 | Argument: |
| 1690 | distance -- a number (integer or float) |
| 1691 | |
| 1692 | Move the turtle forward by the specified distance, in the direction |
| 1693 | the turtle is headed. |
| 1694 | |
| 1695 | Example (for a Turtle instance named turtle): |
| 1696 | >>> turtle.position() |
| 1697 | (0.00,0.00) |
| 1698 | >>> turtle.forward(25) |
| 1699 | >>> turtle.position() |
| 1700 | (25.00,0.00) |
| 1701 | >>> turtle.forward(-75) |
| 1702 | >>> turtle.position() |
| 1703 | (-50.00,0.00) |
| 1704 | """ |
| 1705 | self._go(distance) |
| 1706 | |
| 1707 | def back(self, distance): |
| 1708 | """Move the turtle backward by distance. |