You may also like

problem icon

Spirostars

A spiropath is a sequence of connected line segments end to end taking different directions. The same spiropath is iterated. When does it cycle and when does it go on indefinitely?

problem icon

LOGO Challenge - the Humble Square

Look at how the pattern is built up - in that way you will know how to break the final pattern down into more manageable pieces.

problem icon

LOGO Challenge - the Logic of LOGO

Just four procedures were used to produce a design. How was it done? Can you be systematic and elegant so that someone can follow your logic?

First Forward Into Logo 11: Sequences

Age 11 to 18 Challenge Level:

First Forward Into Logo
Previous: FF10

 

Consider the following procedure which uses two variables:
(Warning - you may have to press HALT to stop this procedure.)
TO LOP :X :Y
PR :X
WAIT 120
LOP :Y :X + :Y
END

What do you think is happening this time?
Try 'chasing' through the procedure the values: x = 1 and y = 1.
No longer surprised!
Why do you think it goes on and on...?
Yes it keeps starting itself again, but with different variables,
moving on in the sequence by adding the last two variables.

Why not experiment further changing the fourth line?
For example:
LOP :Y :X +:Y*2
LOP :Y :X - :Y*2
LOP :Y :X * 2

Any surprises?

LOP :Y * 2 :X + :Y

Etc. Etc. Etc....


 
1
1
3
5
11
21
43
85
171
341
683
1365
2731
5461
10923
21845
43691
87381
174763
349525
699051
1398101
2796203
5592405
11184811
22369621
44739243
89478485
178956971
357913941

 

Next: FF12