Unit 2 Lab 1
Games
In this lab, you will use local and global variables to store information
Starting a Number Guessing Game
Vocabulary
Click each word to view the definition.
Variable
A variable is like a box that can hold one value at a time, such as one word, one costume, or one list (which can contain many things). You can look at what's inside as many times as you want.
Local Variable
A local variable can be set or used only in the environment in which it is defined. This term includes inputs to procedures and variables created by the for or script variables block.
Self-Check
Unit 2 Lab 1: Starting a Number Guessing Game
Checking a Players Guess
Vocabulary
Click each word to view the definition.
Predicate
A predicate is a hexagon-shaped reporter that asks a true/false question.
Boolean value
Predicates report a Boolean value either true or false.
Conditionals
The if and if-else blocks are called conditionals because they control the code based on a true-or-false condition.
Self-Check
Unit 2 Lab 1: Checking The Player's Guess
If There Is Time...
Debugging and Extending Your Number Guessing Game
If There Is Time...
Click to access the page.
Keeping Score With Global Variables
Vocabulary
Click each word to view the definition.
Global Variable
A global variable is a variable that is usable by all scripts in the program.
Initializing
Setting the starting value of a variable is known as initializing the variable
If There Is Time...
Choosing a Costume
Vocabulary
Click each word to view the definition.
Index
The position number is called the index of the item in the list.