Today you will use the current hour block to read the system clock and build time-aware programs.
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 2
✦ CSTA 2-AP-12 · CSTA 2-AP-17 · ISTE 1.5.c · Standards
| 🎯 I can | use the current hour block to read the system clock and build time-aware programs |
| 🧩 New blocks | 1 block |
| 📝 New words | 6 words |
| ⏱ Lesson time | ~40 min |
Teacher Guide
📋 Before class
⚠️ Common misconceptions
- Students often expect (current [hour ▾]) to return 12-hour format. It returns 0–23. Midnight = 0, noon = 12, 11 PM = 23.
- Students may confuse (timer) with (current). Timer counts seconds since the flag was clicked. current [second ▾] returns the clock's current second (0–59).
🎯 Differentiation
🐢 Struggling: Focus only on the greeting card (steps 2–3). Skip the digital clock until the basic if-else logic works.
🚀 Advanced: Challenge them to build an alarm: compare current hour AND current minute to a target time. Use AND to combine both conditions.
💡 During the lesson
- Warm-UpAsk: "If (current [hour ▾]) returns 14, what time is it?" (2 PM.) "What about 0?" (Midnight.) Students from regions using 12-hour clocks may need a brief 24-hour format explanation.
- Try ItWalk through the nested if-else logic: morning = hour < 12, afternoon = 12 ≤ hour < 18, evening = hour ≥ 18. Ask: "What would happen if you just used two separate if blocks instead of if-else? Could both fire?" (Yes — that's a bug. Only if-else guarantees one path.)
The second experiment introduces the chapter's core mechanic: anifblock that tests the hour before deciding what to say. Picking 9 and then 14 shows the difference between time-aware and always-on behavior. This feeds directly into the nested if-else greeting card in Plan & Build. Pick 20 too: Pico still says Good afternoon at 8 PM, which is why the build adds a second test, hour < 18. In the third experiment the timer matches the wait, but the clock second can be any number from 0 to 59. - PlanFive scripts run in parallel from one flag click — each handles one feature independently. This is the parallel-script pattern students have seen before, now applied to real-time sensing.
The second box is the order of the tests. If «less than 18» comes first, the 14:00 run says Good Morning — the wider test catches every hour before 18, so the afternoon test never gets a turn. Pick, then watch both stages at each hour. - BuildSome students may want to format single-digit minutes with a leading zero (e.g., 9:05 instead of 9:5). This is a good extension challenge — use an if block to check if minute < 10, then join "0" before the digit.
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.