Today you will run different code depending on a condition.
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-15 · ISTE 1.5.a · Standards
| 🎯 I can | run different code depending on a condition |
| 🧩 New blocks | 1 block |
| 📝 New words | 6 words |
| ⏱ Lesson time | ~35 min |
Teacher Guide
📋 Before class
⚠️ Common misconceptions
- Students may use plain if instead of if/else and expect the else branch to run — clarify that plain if has no else part.
- Students may think only one branch runs per click, not per loop iteration — run the forever loop to show the switching behavior.
- Some students confuse the top branch (true) with the bottom branch (false/else).
🎯 Differentiation
🐢 Struggling: Color-code the two branches on a printed sheet: green for true branch, red for else branch. Student traces the cat's position by color before building.
🚀 Advanced: Nest a second if/else inside the else branch — three possible outcomes (edge, near edge, far from edge).
💡 During the lesson
- Warm-UpAsk students: "What does a stoplight do when a car comes?" (Green = go, red = stop.) Ask: "Is there ever a third option for the car?" (No — always one of two.) Connect: if/else in Scratch works the same way. Always one answer. if/else is a two-way 2️⃣ block: the cat does one path or the other.
Point to each frame. Ask: "Does the cat stay quiet in any frame?" (No — it always says something.) Ask: "What is different between frame 4 and frame 5?" (Different words.) Tell students: "That is if/else — always one of two things." - Try ItWalk students through one change at a time. After Experiment 1, ask: "What is the cat missing now?" (An answer for NOT at edge.) After Experiment 2, ask: "Does the cat still always do something?" (Yes — turn AND say.) After Experiment 3, ask: "Did we delete the else branch?" (No — we just put a different block inside it.) Reinforce: the else branch can hold any blocks, not only say blocks.
- PlanDo the first box together. Pick, then watch both stages. "Move, forever — it walks on and on. At the edge? — the check. Yes: At edge! Else: Moving..." Ask: "Which box is the fork?" (At the edge?) Connect to the two if/else branches.
- BuildShow students that the if/else block is taller than the plain if block — it has two sections. Walk the room to check that students placed the say blocks in the correct branches. A common error is putting both say blocks in the top branch. Run the project with students watching the say bubbles.
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.