Talk:Spiral matrix: Difference between revisions
→As an exercise in Turtle Graphics.: updated now the code is posted
(→As an exercise in Turtle Graphics.: new section) |
(→As an exercise in Turtle Graphics.: updated now the code is posted) |
||
Line 324:
== As an exercise in Turtle Graphics. ==
<pre>x,y| 0 1 2 3 4
Line 335:
The turtle starts at (0,0) facing east.
When it moves, it leaves a trail of numbers behind it.▼
When it walks a specified distance, it
"right" means "turn right 90 degrees".
These are its
4 walk right
4
▲ 3 move right 3 move right
▲ 2 move right 2 move right
▲ 1 move right 1 move right
("1 move": The turtle must vacate the final
position as it leaves numbers /behind/ it.)
</pre>
--[[User:GordonCharlton|GordonCharlton]] ([[User talk:GordonCharlton|talk]])
|