To draw a square with side length 100, we write in the editor:
to square repeat 4 [forward 100 right 90] end |
We just have to modify this procedure by doing:
We obtain
to square :c repeat 4 [forward :c right 90] end |
Therefore, if we write: square 100 square 50 square 30 square 20 square 10