Terrapin Resources
Where’s My Turtle?

HIDETURTLE     SHOWTURTLE     SHOWN?

In this section, you will learn about commands to hide and show the turtle.


HIDETURTLE
HT


HIDETURTLE makes the turtle invisible. You can still move and turn the turtle and it will go where you tell it.

To make the turtle reappear, use SHOWTURTLE. See the next command.

» Things to Try

Pick a spot in the Graphics canvas. You can use a small sticky note that won’t leave any trace when you remove it. Then hide the turtle with HT.

Give commands that you think will get the turtle to the spot you chose. Then type SHOWTURTLE or just ST.

How close did you come?


SHOWTURTLE
ST


SHOWTURTLE makes a hidden turtle reappear.

If you still can’t see your turtle, it might be because it is the same color as the background. The turtle changes to a solid color when you set its pen color. See the Color Commands for more information.

» Things to Try

Play the game above for HIDETURTLE with a friend and see if they can get the turtle to the spot you marked.


SHOWN?


Usually you can tell right away if your turtle is hidden or showing. However, the SHOWN? command will tell you for sure. FOr example, you may have set the pencolor to be the same as the background, which may make the turtle invisible.

SHOWN? is a reporter that gives you information.

SHOWTURTLE
SHOWN?
Result: TRUE
HT
SHOWN?
Result: FALSE

» Things to Know

You can use SHOWN? in programs you write. That way, you can find out if the turtle is showing or not and write instructions depending on the result. You would use IF or TEST to check the result. See the section on Program Flow to learn how.

If you are using multiple turtles, SHOWN? reports on the visibility of the first active turtle. See the section on Multiple Turtles for more information.