Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 3

A Handful of MicroWorlds Commands

Moving Turtles
fd 30

move the turtle forward 30 steps

bk 30

move the turtle backward 30 steps

lt 45

turn the turtle left 45 degrees

rt 45

turn the turtle right 45 degrees

seth 0

set the turtles heading to 0 degrees (pointing up)

seth 90

set the turtles heading to 90 degrees (pointing right)

setpos [0 0]

set the position of the turtle to the center of the screen

Changing Shape
setsize 60

set the turtles size to 60 (the original size is 40)

setsh "fish

set the turtles shape to the shape named fish

ht

hide the turtle

st

show the turtle

Which turtle are you talking to?


t1,
fd 100

talk to the turtle named t1


tell it to go forward 100 steps

talkto [t1 t2 t3]


fd 100

talk to the turtles named t1 and t2 and t3


tell them to go forward 100 steps

Play Sounds or Music


beebop

play the sound name beebop (and wait until its done
playing before going to the next step)

launch [beebop]

start playing the sound called beebop (and go


immediately to the next step)

Example Procedures
You can teach the turtle new words by defining new procedures in the Procedure area.
to fly

Define a new procedure called fly

t1,

talkto the turtle named t1

repeat 5 [setsh "bee1 wait 1

repeat five times:

setsh "bee2 wait 1]


end

setshape to "bee1 and wait 1/10th of a second


setshape to "bee2 and wait 1/10th of a second
end the procedure

to italy

Define a new procedure called italy

question [Where would you like


to go? A: Rome, B: Venice]

pop up this question: Where would you like to go?


A: Rome, B: Venice

if answer = "A [page2]

if the person types in A then go to page2

if answer = "B [page3]

if the answer types in B then go to page3

end

end the procedure

to sanfran

Define a new procedure called sanfran

question [Where would you like


to go? A: Golden Gate Bridge,
B: Computer Clubhouse]

pop up this question: Where would you like to go?


A: Golden Gate Bridge, B: Computer Clubhouse

if or answer = "A
answer = "a
[page2]
if or answer = "B
answer = "b
[page3]
end

if the person types in A or a


then go to page2
if the answer types in B or b
then go to page3
end the procedure

For more examples, see: http://www.microworlds.com/library/

You might also like