May 2018
Intermediate to advanced
256 pages
6h 20m
English

The dancing program in Chapter 4 was fairly simple and always instructed your turtle to do the same dance moves. In this chapter, we’ll create a new program that makes the turtle do a variety of random moves. While creating this program, you’ll learn about while loops, the Boolean and nil data types, and how to run or skip code blocks based on conditions.
Run the text editor by entering edit mydance2 into the command shell. In the text editor, enter the following lines of code, but don’t type the line numbers because they’re only used here for reference:
mydance2
1. --[[A Better Dance program ...
Read now
Unlock full access