
Lesson Details
What is a variable and its purpose in a program? How to create a variable and manipulate its value in PictoBlox?
Activities:
- Making Tobi move in different directions using keyboard keys and tracking its X and Y position using variables.
- Creating a script to ask the user to enter input and store it in a variable.
Curriculum:
Introduction to Programming for Kids
Classroom Bundle Used: STEM Classroom Bundle, STEM Mini Classroom Bundle
Prerequisites:
Drawing Shapes in PictoBlox
Download Resources
Lesson Overview
Students will learn the following things:
- What is variable and why do we need them in a program using the example of food and bowls.
- How to create a variable in PictoBlox?
- How to manipulate the value of the variable in PictoBlox?
- Activity 1: In this activity, you will track the change in the sprite position using up, left, down and right key on the keyboard.
- Activity 2 (Optional): Saving user input in variables.
Material Required
1 set of the following material per group of 3-5 students:
Component | Image | Quantity | Available in Bundle |
---|---|---|---|
PictoBlox | ![]() |
Installed on Computer |
Lesson Outline
Variables - 20 minutes
- Why do we need a variable?
- Noodles and soup example.
- How to create a variable in PictoBlox?
- Exploring the various blocks to manipulate a variable:
- Set () to () block
- Change () by () block
- Show variable () block
- Hide variable () block
- Variable block
Activity 1 - 30 minutes
- Make a program to track the change in the sprite position using up, left, down and right key on the keyboard.
Activity 2 - 10 minutes
- Saving user inputs in Variables