The turtle starts at (0, 0) in the center, facing right. Each grid square is 50 steps.
Anything you print() shows up here.
forward(100) | Move forward 100 steps |
backward(50) | Move backward |
left(90) / right(90) | Turn in degrees |
penup() / pendown() | Stop or start drawing while moving |
goto(100, -50) | Jump to a point (x, y) |
circle(60) | Circle with radius 60 |
color("red") | Pen color. color("navy", "gold") sets pen and fill |
pensize(5) | Line thickness |
begin_fill() … end_fill() | Fill the shape drawn in between |
speed(0) | 0 is fastest, 1 is slowest, 10 is fast |
hideturtle() | Hide the arrow |
FORWARD 2 | forward(100) |
TURN LEFT | left(90) |
TURN RIGHT | right(90) |
REPEAT 4 [ … ] | for i in range(4): then indent the lines inside |
| Spelling | forward, not foward or Forward |
| Colon | for and def lines end with : |
| Indent | Lines inside a loop start with 4 spaces (press Tab) |
| Quotes | Colors need quotes: "red". Numbers don't. |