Bill Kerr▸ Understanding Functions (Task 1)


Square function algorithm is an oldie, from Seymour Papert, but goodie
pen down
move 50
turn right 90
move 50
turn right 90
move 50
turn right 90
move 50
turn right 90

This can be done with the teacher or a student being a robot. Then it can be progressively improved:
One improvement:
repeat 4
move 50
turn right 90

Another improvement:
Make a variable side and then variable sized squares can be drawn
repeat 4
move side
right 90

A further improvement:
Increment side length over many iterations
side = 1
repeat 100
repeat 4
move side
right 90
side = side + 1

#cserApps1


G+ Comments

no plus ones, 0 comments

    + There are no comments

    Add yours

    Leave a Reply