O'Reilly logo

Alice 3 Cookbook by Vanesa S. Olsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using a counter to run statements many times

In this task, we will learn to group many statements into a block that repeats the execution of the code a specific number of times. We will create a loop that repeats the execution of a group of statements with a synchronous execution the number of times specified by its required integer parameter.

Getting ready

We have to be working on a project with many actors. Therefore, we will use an existing project that has two flowers and a bee.

  1. Open the project saved in the Performing many statements in order recipe in this chapter.
  2. Click on Edit Code, at the lower-right corner of the big scene preview. Alice will show a smaller preview of the scene and will display the Code Editor on a panel located at the right-hand ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required