2.2 Draw a triangle (with a loop)

Scratch solution

View solution

This is just one of many possible solutions:

when green flag clicked
clear
pen down
repeat (3)
  move (100) steps
  turn cw (120) degrees
  wait (1) secs
end
pen up

Back to programming challenge

Extra Challenge

Extra challenge #1: Write a program that takes the length of a side of a equilateral triangle (a triangle in which all three sides are equal) as the input, draws the triangle with the given side and displays its perimeter as the output.