Turtle
clean
Clear the screen and reposition the turtle to the center.
clean

forward
forward steps
fd steps
Move the turtle forward.
fd 100

back
back steps
bk steps
Move the turtle backward.
bk 100

right
right angle
rt angle
Turn the turtle right.
fd 100 rt 90 fd 100

left
left angle
lt angle
Turn the turtle left.
fd 100 lt 90 fd 100

arc
arc angle radius
Draw an arc.
arc 180 100
arc -180 100

setxy
setxy x y
Set the position of the turtle.
setxy 100 100
setxy -100 -100

xcor
The x (horizontal) coordinate of the turtle.
print xcor

ycor
The y (vertical) coordinate of the turtle.
print ycor

setheading
setheading direction
seth direction
Set the heading of the turtle.
seth 45

heading
The heading of the turtle.
seth 90 setc heading fd 100

Pen
penup
penup
pu
Raise the turtle's pen so that it will not draw.
repeat 10[fd 5 pu fd 5 pd]

pendown
pendown
pd
Lower the turtle's pen so that it will draw.
repeat 10[fd 5 pu fd 5 pd]

setpensize
setpensize size
setps size
Set the width of the turtle's pen.
setps 8 fd 50

forward 0 draws a fill circle with the radius equal to the pen size
setps 50 fd 0

pensize
The width of the turtle's pen.
print pensize

setcolor
setcolor number
setc number
Set the color of the turtle's pen.
setc 0 fd 50 setc 60 fd 50

color
The color of the turtle's pen.
repeat 10 [fd 5 setc color + 10]

setshade
setshade number
setsh number
Set the shade of the turtle's pen.
setsh 30 fd 50 setsh 50 fd 50 setc 80 fd 50

shade
The shade of the turtle's pen.
setsh 0 repeat 10 [fd 5 setsh shade + 10]

startfill
Mark the start of an area to be filled.
Try
startfill repeat 6 [fd 100 rt 60] endfill

endfill
Mark the end of the area and fill it.
startfill repeat 6 [fd 100 rt 60] endfill

fillscreen
fillscreen color shade
Fill the screen with a color and a shade.
fillscreen 30 50
Numbers
Arithmetic in ArtLogo proceeds from right to left. 1+2*3 is read as 1+(2*3)
sum
sum number number
number + number
Add two numbers.
print sum 11 10
print 11 + 10

-
Subtract one number from another.
print 11 - 10

*
Multiply two numbers.
print 11 * 10

/
Divide one number by another.
print 11 / 10

remainder
Calculate the remainder when dividing two numbers.
print remainder 11 2
round
Round a number.
print round 1.7

minus
Negate a number.
print minus 10

random2
random2 from to
Generate a random number between the two specified values.
repeat 10 [setc random2 0 100 fd 5]

oneof
oneof this that
Choose one of two numbers.
repeat 10 [setc oneof 90 55 fd 5]

>
Test if one number is greater than another.
clean loop [setc ycor fd 10 if ycor > 100 [stop]]

<
Test if one number is less than another.
clean repeat 1000 [if ycor < 100 [fd 1]]

=
Test if two numbers are equal.
clean repeat 500 [if heading = 180 [rt 180] fd 1 rt 1]

!=
Test if two numbers are not equal.
clean repeat 500 [ifelse heading != 180 [fd 1 rt 1] [rt 180]]

print
Print a value.
print color
print heading
make "list [10 20 30] print :list

Flow
wait
wait ticks
Wait for some time (in tenths of seconds).
clean repeat 100 [fd 5 rt 10 wait 1]

repeat
repeat times [list-of-commands]
Repeat the commands a specified number of times.
clean repeat 5 [fd 50 rt 72]

loop
loop [list-of-commands]
Repeat the commands indefinitely.
clean loop [fd 50 rt 72]
press Command . to stop the loop

if
if condition [list-of-commands]
Conditionally run some commands.
clean
loop [setc ycor fd 10 if ycor > 100 [stop]]


ifelse
ifelse condition [commands-when-true][commands-when-false]
Conditionally run some commands if the results of the comparison is true, otherwise run the other list of comands.
clean
repeat 500 [ifelse heading != 180 [fd 1 rt 1] [rt 180]]


stop
Stop the program that is running.
clean
loop [setc ycor fd 10 if ycor > 100 [stop]]


output
output value
Used to make a procedure to output a value
Type on the procedure area
to double :a
output :a * 2
end

then type on the command center
print double 37

run
run [ do-list-of-commands ]
Runs the list of commands.
run [fd 50 rt 90]
My Blocks
storeinbox
storeinbox1 value
storeinbox2 value
storeinbox3 value
Store a number in a box.
storeinbox1 10
print box1

storeinbox2 -15
print box2

seth 45 storeinbox3 heading + 10
print box3


box
box1
box2
box3
The current value of a box.
storeinbox1 10
print box1

storeinbox2 -15
print box2

seth 45 storeinbox3 heading + 10
print box3


make
make quoted-name value
Sets a value to a variable.
make "a 10
print :a

to
to procedure-name
Name a sequence of commands in the procedures area to create your own command.
to go
clean
repeat 5 [fd 50 rt 72]
end

Lists
sentence
se value value
Joins two values
storeinbox1 10
print se 30 box1

first
first list
First of the list.
print first [1 2 3]

butfirst
bf list
All the elements of the list except the first.
Try
print bf [1 2 3]

last
last list
Last element of the list.
print last [1 2 3]

butlast
bl list
All the elements of the list except the last.
print bl [1 2 3]

count
count list
Number of elements of the list.
print count [1 2 3]

item
item position list
Element at the specified position on the list.
print item 2 [1 2 3]

nth
nth index list
Element at the specified index on the list.
print nth 0 [1 2 3]

setnth
setnth index list value
Set an item of a list to a value.
make "list [1 2 3] setnth 1 :list 10
print :list

pick
pick list
Pick a random item from a list
make "colors [55 95 15] repeat 10 [setc pick :colors fd 15]