Today you will create a variable and change its value.
1 Warm-Up
2 Predict
3 Try It
4 Plan
5 Build
6 Fix It
7 Extend
8 Math Challenge
For teachers · goals · guide
Lesson Outcomes · for teachersCSTA 1B
✦ CSTA 1B-AP-09 · CSTA 1B-AP-11 · CSTA 1B-AP-15 · ISTE 1.5.a · Standards
| 🎯 I can | create a variable and change its value |
| 🧩 New blocks | 2 blocks |
| 📝 New words | 7 words |
| ⏱ Lesson time | ~40 min |
Teacher Guide
📋 Before class
⚠️ Common misconceptions
- Students may think the variable always starts from zero — it keeps its last value unless reset with 'set to 0'.
- Students may confuse 'set to' (replace) with 'change by' (add). Show them side by side.
🎯 Differentiation
🐢 Struggling: Provide a labeled diagram: a box with '📦 score' on the outside and '0' inside. Have them draw it on paper first.
🚀 Advanced: Challenge them to make two variables — one for score, one for lives — and decrease lives when touching the edge.
💡 During the lesson
- Warm-UpDraw a simple box on the board. Write "score" on the outside and "0" inside. Ask: "If I scored 1 point, what number goes inside now?" (1.) If I scored again? (2.) This is exactly what
change [score ▾] by (1)does. A variable is a box that can store 💾 a number or word.
Point to each frame and ask: "What number is in the box now?" Students chant the values together. Reinforce that the box (variable) updates every time the cat moves. - Try ItHold up
set [score ▾] to (0)andchange [score ▾] by (1)side by side. "Set" replaces the number. "Change" adds to it. Theforeverblock (from earlier) wraps blocks so they repeat without stopping.
Run the first experiment first — students see the start number go into the box, then grow by 1. Run the second — with 5 the score jumps by 5 each step, and with -1 it falls. Run the third — the score climbs to 10, thensetthrows the 10 away. Then, in Scratch, run the script without the set block twice — the second click shows the score keeps growing from last time (no reset). This makes the role ofset [score ▾] to (0)visible. Positive numbers increase, negative numbers decrease — trychange [score ▾] by (-1)as a bonus. - PlanAfter students fill the plan boxes, ask: "Why do we reset the score FIRST?" (So it does not keep adding from last time.) This is a key sequencing concept. Point out that the storyboard and the flowchart show the SAME plan two ways — the flowchart is the grown-up version they will use more from now on.
- BuildWalk the room after step 2 — many students will not see the variable appear on the screen. Point it out: "Do you see the orange box in the top-left corner? That is your variable on display." Also watch for students who skip step 4 — the reset — and see unexpected scores.
Show the picture first. Ask what will happen — everyone points or says one word.
Everyone picks an answer first. Then press the flag together.
Change one thing at a time. Run it, watch, then change the next thing.
Pairs put the cards in order before anyone opens Scratch.
Students build step by step. Walk around — help with questions, not with the mouse.
Ask: what did we want, and what did it do? Let them find it.
Fast finishers pick the next tier. Everyone else finishes their build.
Work it out on paper first. Then check it on the stage.