In the lesson, a square is 4 sides with 90-degree turns, and a triangle is 3 sides with 120-degree turns. Here the turn is always 360 divided by the number of sides, so any number of sides closes neatly into a shape.
Try this: Change the sides to 3 and press Run again — the square becomes a triangle, with 120-degree turns.
Press Run to draw.