This page (revision-32) was last changed on 03-Feb-2023 15:21 by Maury Markowitz 

This page was created on 07-Aug-2017 01:38 by Roland B. Wassenberg

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
32 03-Feb-2023 15:21 8 KB Maury Markowitz to previous
31 09-May-2018 19:45 8 KB Maury Markowitz to previous | to last
30 09-May-2018 19:44 8 KB Maury Markowitz to previous | to last
29 09-May-2018 19:26 8 KB Maury Markowitz to previous | to last
28 04-May-2018 14:31 8 KB Maury Markowitz to previous | to last
27 03-May-2018 20:13 8 KB Maury Markowitz to previous | to last
26 01-May-2018 01:15 6 KB Roland B. Wassenberg to previous | to last
25 01-May-2018 00:56 6 KB Roland B. Wassenberg to previous | to last
24 28-Apr-2018 21:49 6 KB Maury Markowitz to previous | to last
23 28-Apr-2018 13:52 6 KB Maury Markowitz to previous | to last
22 28-Apr-2018 13:52 6 KB Maury Markowitz to previous | to last
21 27-Apr-2018 23:52 6 KB Maury Markowitz to previous | to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 21 changed one line
The code starts with the {{U}} which lifts the pen ({{U}}p) so the following commands will not draw to the screen. This is followed by a {{2}}, which means the next instruction should be run twice. In this case, the next instructions is {{L}}eft. Since each step of a turn is 45 degrees, this causes the turtle to point to the left side of the screen. Next, the turtle moves {{F}}orward 12 steps, is pointed {{N}}orth, and then put back {{D}}own so the following commands will cause drawing on the screen.
The code starts with the {{U}} which lifts the pen ({{U}}p) so the following commands will not draw to the screen. This is followed by a {{2}}, which means the next instruction should be run twice. In this case, the next instructions is {{L}}eft. Since each step of a turn is 45 degrees, this causes the turtle to rotate 90 degrees to the left so it points to the left side of the screen. Next, the turtle moves {{F}}orward 12 steps, is pointed {{N}}orth, and then put back {{D}}own so the following commands will cause drawing on the screen.
At line 23 changed one line
Next, the {{12F}} draws 12 steps, and since the turtle was pointing north, this causes a short line segment to be drawn up the screen. Then comes a {{3}}, meaning the following instruction should be run three times, but in this case it is not a single instruction, but all of the instructions in the parens. These rotate {{2R}}ight, or 90 degrees, and then draws a segment 24 long. So the first iteration draws the horizontal line across the top, then the vertical line down the right side, then across the bottom. Finally, the ending {{2R12F}} finishes off the square by drawing the missing segment on the bottom of the left vertical side.
Next, the {{12F}} draws 12 steps, and since the turtle was pointing north, this causes a short line segment to be drawn up the screen. Then comes a {{3}}, meaning the following instruction should be run three times. In this case it is not a single instruction, but all of the instructions in the parens. These rotate {{2R}}ight, or 90 degrees, and then draws a segment 24 long. So the first iteration draws the horizontal line across the top, the next the vertical line down the right side, and then across the bottom. Finally, the ending {{2R12F}} finishes off the square by drawing the missing segment on the bottom of the left vertical side.