Today you will compare numbers to make decisions in code.
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-10 · CSTA 1B-AP-09 · CSTA 1B-AP-15 · ISTE 1.5.a · Standards
| 🎯 I can | compare numbers to make decisions in code |
| 🧩 New blocks | 3 blocks |
| 📝 New words | 9 words |
| ⏱ Lesson time | ~40 min |
Teacher Guide
📋 Before class
⚠️ Common misconceptions
- Students confuse the assignment = (set variable) with the comparison = (operator_equals). Stress that the green diamond checks, the orange block sets.
- Students place comparison blocks outside the if-diamond slot — the block must snap INTO the diamond shape of the if block.
- Students expect the cat to say something every frame; remind them the say block only fires when the condition is TRUE.
🎯 Differentiation
🐢 Struggling: Give a printed number line 0–10. Have students circle numbers above 5, then map those to 'true' before touching Scratch.
🚀 Advanced: Chain two comparisons: if score > 5 AND score < 10 — preview of boolean logic (next chapter).
💡 During the lesson
- Warm-UpHold up two number cards (e.g. 7 and 4). Ask the class: "Which is greater?" Then ask: "How does a computer know?" Introduce the idea that code must use a comparison block — it cannot just "see" numbers the way we do.
Trace the sequence aloud: "Score starts at 0. Every step, score gets bigger. When score passes 5 — the condition is TRUE — and the cat reacts." Ask students to predict at which frame the cat says something. - Try ItPoint out the diamond shape of all three green operator blocks and the
ifslot. Say: "They are the same shape — that is how you know they fit together." Read each symbol aloud:>greater,<less,=equal.
The second experiment introducesoperator_lt; the third introducesoperator_equals. Ask: "With score = 10, whichiffires?" (both>and=— 10 > 5 is TRUE too, so the cat says "High score!" then "Exact!"). The=block is TRUE only when the two numbers are exactly equal — not bigger, not smaller. Each check compares the score with a threshold number; the checks can overlap. - PlanWalk through the flowchart together. Emphasize the decision diamond — "Is score > 5?" has two exits: TRUE and FALSE. This is the core of algorithmic thinking at L3.
- BuildThe most common error: students put the
>block NEXT TO theifblock instead of INSIDE the diamond slot. Show it on the projector — drag slowly and hover until the diamond slot glows white before releasing.
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.