Today you will pull a bonus letter out of a code word, then show that code three ways: the letter, its number, and its color.
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-DA-07 · ISTE 1.5.c · Standards
| 🎯 I can | pull a bonus letter out of a code word, then show that code three ways: the letter, its number, and its color |
| 🧩 New blocks | 1 block |
| 📝 New words | 5 words |
| ⏱ Lesson time | ~45 min |
Teacher Guide
📋 Before class
⚠️ Common misconceptions
- Students think the bonus code has only one form. The letter h IS the number 8 IS a color — one code, three forms.
- Students swap the two list blocks.
item # oftakes a letter and gives its position number;item ( ) oftakes a position number and gives the letter. They are opposites. - Students use
=for the bonus check.=needs an exact match, so extra typed letters break it.containslooks inside the typed letters. - Students mix up
letter ( ) ofandlength of.letter (1) of [hat]gives one letter, h.length of [hat]gives a count, 3.
🎯 Differentiation
🐢 Struggling: Give a paper alphabet strip numbered 1 to 26. Write the code word hat in three boxes numbered 1, 2, 3. Let students point to letter 1 and read its number before touching Scratch.
🚀 Advanced: Give each apple its own code letter. Add the code number of every caught apple to a list, then decode the list back into a word.
💡 During the lesson
- Warm-UpWrite "hat → h = 8 = 🟦" on the board next to a screenshot of the Chapter 12 Catch Game. Ask students to name other codes they know (traffic lights, jersey numbers, emoji). The big idea: one piece of game data, many forms. This is CSTA 2-DA-07 — represent data using multiple encoding schemes. The chapter adds four small scripts to the game students already own; nothing is rebuilt from zero. Students last used
letter ( ) ofandlength ofin Level 3 Chapter 12 — this chapter puts those two string blocks back to work on the game's own data. - Try ItThe first experiment is the proof of the standard: change the code word and all three forms change together (zoo → z = 26 = a different color). The second experiment introduces the new block
contains, which reports true or false. Point out thatcontainsanswers a yes/no question, whileitem # ofanswers "which position?". In the third experiment, "hz" pays nothing because it is 2 letters long and "hat" is 3 —length ofguards the bonus so a half-typed guess cannot win. - PlanThe IF diamond compares two lengths, so the bonus check only runs on a full-length guess. Ask: "Which arrow runs when the guess is still too short?" (No → keep catching apples.) Inside
check guessthe newcontainsblock decides whether the guess holds the code letter. Note that the third lane is the Pico script from Chapter 12 — students add two blocks inside a loop they already wrote. - BuildThe list IS the data model — item 8 stores h. Encoding reads the position; decoding reads the item at that position. Step 11 gates the bonus on length, so a guess is only judged once it is as long as the code word. Push the point that the bonus size, Pico's color, and the letter are all the same code. Change
wordto zoo and every form changes at once.
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.