BlocosIA Wiki Editor

Draw shapes with the pen

Medium · Teach the sprite to draw a square, a star and a colorful flower.

Interactive tutorial: the editor checks each step by itself.

  1. Add the "Pen" extension.
  2. Choose a sprite and drag "when flag clicked".
  3. In the Pen category, snap "erase all" and then "pen down".
  4. In Control, snap "repeat 10" and change 10 to 4.
  5. Inside the "repeat", put "move 100 steps" and "turn right 90 degrees".
  6. Click the flag: a square!
  7. Now change 4 to 5 times and 90 to 144 degrees: a star!
  8. Challenge: put "set pen color to hue" (Pen) with a random number inside the repeat so each side has a color. (challenge)

Open in the editor