Hardware Reference
In-Depth Information
7.
In the Blocks palette, click Control to switch to the control blocks. Under the
irst block in the Scripts tab, add the control block
forever
. Inside the
for-
ever
block add the control block
wait 1 secs
and the looks block
next
costume
. Figure 3-11 shows the script at this point.
he
forever
block is a
loop
. It runs the same sequence of blocks over and over
again until you stop the program. In this case, you are making the monkey
change his facial expressions, over and over again. In computing, this kind of
repetition is called
iteration
.
FIGURE 3-11
he Crazy Monkey script with a
forever
block