← Back home

Program Turtle Shapes

Load or write turtle programs, then run them to draw creative shapes.

  • Logic
  • Medium
  • 6 min
  • 9-12

Program Turtle Shapes

Pick a fun program or write your own turtle commands. Try commands like forward, left/right, repeat, penup/pendown, and setxy.

Pick a preset or write your own program.

Commands Cheatsheet

  • forward <steps> - move forward on the grid.
  • left/right <angle> - turn clockwise or counter-clockwise.
  • repeat <n> [ ... ] - run the commands inside the brackets n times.
  • penup / pendown - move without drawing, or resume drawing.
  • setxy <x> <y> - jump directly to a coordinate.

How to Play

How to Play

  1. Load a preset to study sample programs or begin with a blank editor.
  2. Type turtle commands (forward, right, repeat, setxy, etc.) directly into the code window.
  3. Press Run to animate the turtle. If an error appears, read the feedback panel, adjust the code, and try again.
  4. Use Clear to reset the canvas, or keep drawing by positioning the turtle with penup/pendown.

Knowledge Background

Turtle graphics introduce students to procedural thinking, coordinate geometry, and transformational reasoning. They learn how loops generate repeated patterns, how angles dictate turns, and how Cartesian coordinates control position.

Why This Helps Kids

Writing code with instant visual feedback encourages experimentation. Students build perseverance as they debug syntax errors, and they experience the satisfaction of turning math ideas (angles, lengths, symmetry) into digital art.

Extensions & Teacher Tips

  • Assign design challenges (“draw a star with as few commands as possible” or “write your initials”).
  • Encourage students to comment their code so classmates can follow the logic.
  • Connect with geometry lessons by calculating perimeter or interior angle sums of the figures they draw.
  • Transition to Trace Path Shapes for coordinate accuracy or to block-based Draw Turtle Shapes for beginners.