Learn Alice in FREE step-by-step lessons.
Unit IV: Advanced Techniques

An array is a list. When you declare a variable in Alice, you can select to make it an array.
In this lesson, you will declare and use arrays. An array is a variable that is a list.
You will create arrays of words, numbers, or objects, then use loops to process the entire array.
Goals:
- Learn to declare and use arrays (lists);
- Understand how arrays can act on groups of objects together;
- Learn to create array of different types, including objects;
- Use the control structures that operate on arrays;
- Define parallel arrays and name ways to use them;
- Be able to use arrays of segments.
Objectives:
- Declare a variable to be an array;
- Create code to assign initial values to an array;
- Use subscripts or index to access the elements of the array;
- Utilize loop control structures to process all of the elements of the array;
- Create and process arrays of different data types, including arrays of objects;
- Understand the purpose of parallel arrays and ways to use them;
- Experiment with arrays of segments.
Please study the material at each of the links below.
Arrays: Ready, Set, Go!: Tortoise says "Ready", "Set", "Go" using array
An array of animals: An array of SJointedModel contains, yeti, tortoise and stuffedTiger
The animals talk: Parallel Arrays: One array contains animals, the other the things they say
Who's the tallest?: People are in an array, a loop is used to find the tallest.
Animals counting: An array of animals take turns to count
Birds spread wings and say something: An array of birds perform
Fish swim to cave with procedure: Each fish swims to cave with procedure
Array of Objects: An array is madeup of different classes- Segments of an elephant's trunk as an array: The segments of an elephant's trunk, tail and a few other things are an array.
Self-Study Questions: What have you learned?
Active Learning: Arrays: Show what have you learned- Complete Step 6: Scene Procedures for the final project.
Discussion questions: What do you think?
Glossary for arrays lesson
Full Glossary