Professional Documents
Culture Documents
Constructors
joins two items (words or lists) together with a space between (as a
sentence i i se i i list)
joins two items (words or letters) together with no space (as a word)
word i i -
De-Constructors
returns the first item of input (a word or list)
first i -
returns everything but the first item of input (a word or list)
butfirst i bf i
returns the last item of input (a word or list)
last i -
returns everything but the last item of input (a word or list)
butlast i bl i
returns the nth item of i
item n i -
Conditional Tests
when test returns "true" does commands and continues, otherwise
if (test) [commands] continues
when test returns "true" does first commands and continues, when
ifelse (test) [commands]
test returns "false" does second commands and continues
[commands]
sets flag to "true" or "false"
test (test)
checks flag before completing commands
iftrue [commands]
checks flag before completing commands
iffalse [commands]
Turtle Graphics
Fill _
moves the turtle to the x, y coordinates given
setpos [n n] _
moves the turtle to x or y coordinates given
setx n or sety n _
outputs the x and y or x or y position of the turtle
pos or xcor or ycor _
sets the turtle's heading in degrees (0 is up)
Setheading n seth n
outputs the heading the turtle would have if facing x, y given
towards [n n] _
eg. to square defines the name of a procedure to teach logo
to procedure _ commands
takes you to the editor to edit a procedure
edit procedure _
eg. to square :size sets a variable :size that can be used in square
:variable_name _
repcount none the number of times that a procedure has been repeated
PERSPECTIVE none Switch to 3D mode
LEFTROLL n none Rolls the turtle (on to his left side) by n degrees
RIGHTROLL n none Rolls the turtle (on to his right side) by n degrees
UPPITCH n none Pitches the turtle nose up by n degrees
DOWNPITCH n none Pitches the turtle nose up by n degrees