Unit 2 Lab 1

Games

In this lab, you will use local and global variables to store information

BJC Unit 2 Lab 1

Starting a Number Guessing Game

Unit 2 Lab 1 Page 1

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

Unit 2 Lab 1 Part 2

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...

Unit 2 Lab 1 Part 2 Take It Further

Debugging and Extending Your Number Guessing Game

BJC Unit 2 Lab 1 Part 3

If There Is Time...

BJC Unit 2 Lab 1 Part 3 TIF

Keeping Score With Global Variables

BJC Unit 2 Lab 1 Part 4

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...

BJC Unit 2 Lab 1 Part 4 ITIT

Choosing a Costume

BJC Unit 2 Lab 1 Part 5

Vocabulary

Click each word to view the definition.

Index

The position number is called the index of the item in the list.

Self-Check:

Unit 2 Lab 1: Choosing a Costume