alice variablesVariables in Alice3

Variables in Alice3

Learn Alice in FREE step-by-step lessons.

Unit II: Creating Code

Read the lesson on Variables in Alice 3

A variable is a named location in memory. In this lesson, you will learn about variables and how to use them.

Your program will declare variables, assign them values, then use them in your code.

In this chapter, you will learn about variables and how they are used to store information in an Alice program. You will learn how to declare variables, choose appropriate data types, and assign values to them. You will also explore how the values stored in variables can be changed and used throughout a program to control actions, perform calculations, and make your programs more flexible.

Objectives:

Please study the material at each of the links below.

  1. Variables Variables: What is a variable?
  2. Code Preferences: Change the preference to Java
  3. Variables for ease of modification: Use variables to make changes easier
  4. Variable Scope: Scope is where a variable is available
  5. Assign a value to a variable: Give a varaible a new value
  6. Data Types: Values in Alice can be string, integer, double, Boolean or any of the gallery classes.
  7. Drill on type Drill on type: See if you can select the correct type.
  8. Name of variables: Variable names must follow rules, such as no spaces.
  9. Drill on names Drill on names: See if you can select the valid names.
  10. Constants: Varaibles ccan change of vary. Constants can not change.
  11. Variables for movement: Variables are useful for any movement
  12. Editing variables: Add to variable
  13. S Jointed Model as variable S Jointed Model as variable: The jokester can be any of the animals.
  14. Self-Study Questions Self-Study Questions: What have you learned?
  15. Discussion questions Discussion questions: What do you think?
GlossaryGlossary for Variables in Alice 3
Full Glossary