Primitives
•Built in words in Microworlds Logo
that tell the application what to do.
•Example: fd, bk, show, pos
fd (forward)
•Definition: Moves the turtle forward.
–Syntax: fd number
•Example: fd 20
•Notes:
–The turtle leaves a trace if its pen is down
–The maximum number is 9999
bk (back)
•Definition: Moves the turtle backwards
–Syntax: bk number
•Example: bk 50
•Notes:
–The turtle leaves a trace if its pen is down
–The maximum number is 9999
rt (right)
•Definition: Turns the turtle to the
right
–Syntax: rt number
•Example: rt 90
•Notes:
–The maximum number is 9999
lt (left)
•Definition: Turns the turtle to the
left.
–Syntax: lt number
•Example: lt 90
•Notes:
–The maximum number is 9999
Degrees
pd (pen down)
•Definition: Puts down the pen of the
current turtle. The turtle will then
leave a trace when it moves.
•Example: pd
•Notes: It does not leave a trace if it
is dragged.
pu (pen up)
•Definition: Lifts the pen of the
current turtle. The turtle will not
leave a trace when it moves.
•Example: pu
setc (set pen color)
•Definition: Sets the color of the turtle’s
pen.
–Syntax: setc name or number
•Example: setc “red
setc 16
•Notes:
–If the turtle has its original shape it will show the color
–If using a name input you must use a “ before the name.
setpensize
•Definition: Sets the pen size of the
turtle
–Syntax: setpensize number
•Example: setpensize 20
•Notes:
–The original pen size is 1.
–The maximum pen size is 100.
seth (set heading)
•Definition: Sets the turtle’s heading
to the specified direction (in
degrees)
–