Forest Wiki: Learn Web Development in the Browser
Turtle Graphics
Iteration

Iteration




The Problem Statement

That was too much typing, Let us try iterating, to create a polygon. 

This code may be helpful:

for i in range(5):

      t.turn (15)

     t.forward(10)

Now please create a triangle, a square and a pentago. 

 

Starting Source Code