This version of Logo is more powerful than the Level 1 version.
You can create procedures that the computer remembers. Here is an example
Running the code above teaches the computer how to draw a triangle. However the turtle will not draw anything until you type the word triangle
This procedure includes a variable so it will draw a pentagon of any size. If you type pent 70 you will see a pentagon with sides of length 70.
Outputs a random number between the two given numbers.
Example: rt (random 1 360)
rotates the turtle right though a random number of degrees.
Use wrap to make the turtle reappear on one side of the screen if it disappears off the other. window turns wrapping off.
repeat 12[Brick rt 30]
to tree :size
if :size < 5 [forward :size back :size stop]
forward :size/3
left 30 tree :size*2/3 right 30
forward :size/6
right 25 tree :size/2 left 25
forward :size/3
right 25 tree :size/2 left 25
forward :size/6
back :size
end
clearscreen
tree 120
Close
Level 1 - Basic use of Logo commands to draw shapes
Level 2 - Some more Logo commands to draw more complex shapes
Level 3 - Use Logo procedures to draw more complex diagrams
History - See all of the commands you have typed into Logo this session.
More on Angles including lesson Starters, visual aids and investigations.
David Eisenstat, US
See how complex designs can be produced with only a small amount of code. This competition winner is called Dahlia:
repeat 8 [rt 45 repeat 6 [repeat 90 [fd 2 rt 2] rt 90]]
The 6 can be replaced with 1 to 7 for other flowers.