Learn Alice in FREE step-by-step lessons.
Module 09: Variables in Alice 3
A variable is a named location in memory. In this module, you will learn about variables and how to use them.
Your program will declare variables, assign them values, then use them in your code.
Goals:
- Learn about variables and how to use them
- Declare variables
- Assign them values
Objectives:
- Name the different types in Alice.
- Name variables and objects correctly.
- Declare a variable and give it an initial value.
- Use the assign statement to give a variable a new value.
- Select and use functions to ask the user a question and store the result.
- Experiment with the tools available in Alice3.
- Use constants appropriately.
Please study the material at each of the links below.
Variables: What is a variable?- Code Preferences: Change the preference to Java
- Variables for ease of modification: Use variables to make changes easier
- Variable Scope: Scope is where a variable is available
- Assign a value to a variable: Give a varaible a new value
- Data Types: Values in Alice can be string, integer, double, Boolean or any of the gallery classes.
Drill on type: See if you can select the correct type.- Name of variables: Variable names must follow rules, such as no spaces.
Drill on names: See if you can select the valid names.- Constants: Varaibles ccan change of vary. Constants can not change.
- Variables for movement: Variables are useful for any movement
- Editing variables: Add to variable
S Jointed Model as variable: The jokester can be any of the animals.
Self Study Questions: What have you learned?
Discussion questions: What do you think?
Glossary for variables lesson
Full Glossary