4PROGRAMMING TURTLES TO DANCE

image

Now that our turtles can talk, let’s make them walk. Or even better, let’s make them dance! Although turtles come with a program called dance, it’s a simple program that only makes the turtles turn randomly. In this chapter, you’ll create a much better turtle dancing program. The steps will look like Figure 4-1.

image

Figure 4-1: The turtle’s dance steps

WRITING A DANCE PROGRAM

Using the text editor, create a program named mydance by entering edit mydance in the command shell. In the text editor, enter the following lines ...

Get Coding with Minecraft now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.