🗺️ Map
Loops

Level 3 · Square with a loop

‹ 3 / 15 ›
</>

Same square, shorter code: add left(90) inside the loop and make the sides 120.

🐍 Your Python code
🐢 Turtle commands
  • forward(100)move forward 100 steps
  • left(90)turn left 90 degrees
  • right(90)turn right 90 degrees
  • penup()lift the pen (move without drawing)
  • pendown()put the pen down again
  • color("red")change the colour
  • circle(50)draw a circle
  • for i in range(4):repeat 4 times (indent the lines inside)
  • def flower():make your own command