Lesson 7: Variables and Parameters in Scratch
What You'll Learn
In this lesson, we'll explore variables and parameters in Scratch. You'll learn how to create and use variables to store information, and how to use parameters to make your code more flexible and reusable.
Key Concepts
Variable
A container that stores a value which can change during the program's execution.
Parameter
A value that can be passed into a block to customize its behavior.
Scope
The area of the program where a variable can be accessed and modified.
Data Types
Different kinds of data that can be stored in variables (numbers, text, etc.).
Blocks We'll Use
Variable Blocks
- Make a Variable
- Set [variable] to [value]
- Change [variable] by [value]
- Show/Hide Variable
Parameter Blocks
- Pick Random [1] to [10]
- Ask [Question] and Wait
- Answer
- Timer