Explore the Scratch program Data Tab which allows you to create and modify your own variables.
Create and modify variables using the Data Tab.
1 computer (**at least one computer per two students**)
Computer with projector or SMART board.
- What does the program in step 4 do? (It counts the number of times you press the space bar to make the sprite move forward. When the sprite reaches the edge, it turns 180 degrees and moves back the opposite way.)
What To Do
Ensure that all the computers work, and are connected to the internet.
Set up the instructor computer and projector or SMART board. Log in to the Scratch website.
- Explain that you are going to make it possible to count or keep score during a game
- On the screen or SMART Board, open a new scratch project and select the Data tab.
- Demonstrate how to make a new variable called Score.
- Have students follow along on their own computers as you assemble this logic.
- Have students run the program to discover what it does.
- Go to scratch.mit.edu/starter_projects and open Maze Starter.
- Modify this program so that it counts the number of times the user hits the blue obstacle.