Lesson 3: Keeping score at the Little Hill fair
Unit overview - Previous: Lesson 2 - Next: Lesson 4
About 45 minutes.
Goal
Children run a game program that uses events and a score variable.
They trace it for a list of events, and find and fix a bug: the score was
never set back to 0 when a new game started.
Materials
- One "score" box and one set of number cards 0 to 20 per group of four.
- Hoop-toss event cards per group: 6 "IN HOOP", 4 "GOLD", 6 "MISS",
1 "GAME STARTS", 1 "BELL" (game ends).
- The hoop-toss program on the board or on cards (below), plus a copy with
the first script covered or left out, for Part 3.
- A class trace table on the board (columns: event, step, score).
- Paper and pencils for traces; blank index cards (stretch: BULLSEYE).
Steps
Opening (5 min)
- Say: "The made-up town of Little Hill is having a school fair. One stall
has a hoop-toss game. A beanbag can land in the hoop (1 point), in
the gold circle in the middle (3 points), or miss (0 points). The
stall wants a program to keep the score."
- Say: "Nobody throws anything today. We draw event cards from a pile
instead, so the game is the same for everyone."
Main activity (30 min)
Part 1: the program (8 min). Put up:
WHEN GAME STARTS:
SET score TO 0
WHEN IN HOOP:
CHANGE score BY 1
WHEN GOLD:
CHANGE score BY 3
WHEN BELL:
SAY score
IF score is greater than 4 THEN:
CLAP 2 TIMES
ELSE:
CLAP 1 TIME
Ask: "Which event has no script?" (MISS. Nothing happens, so the score stays
the same.) Trace List 1 together on the board:
| Event |
Step |
score |
| GAME STARTS |
SET score TO 0 |
0 |
| IN HOOP |
CHANGE score BY 1 |
1 |
| MISS |
(no script) |
1 |
| GOLD |
CHANGE score BY 3 |
4 |
| IN HOOP |
CHANGE score BY 1 |
5 |
| BELL |
SAY score; 5 is greater than 4, so CLAP 2 TIMES |
5 |
Part 2: groups run fixed lists, then a random game (12 min). Roles
rotate: event giver, box keeper, tracer, checker. Groups run:
- List 2: GAME STARTS, GOLD, GOLD, MISS, IN HOOP, BELL. (0, 3, 6, 6, 7;
says 7; clap 2 times.)
- List 3: GAME STARTS, MISS, IN HOOP, GOLD, BELL. (0, 0, 1, 4; says 4;
4 is not greater than 4, so clap 1 time.)
Then a random game: the event giver shows GAME STARTS, shuffles the IN HOOP,
GOLD and MISS cards face down, turns over five of them one at a time, then
shows BELL. The tracer writes each step. (The biggest possible score is 13:
four GOLD and one IN HOOP. Any total is fine; the check is that the trace
matches the cards.)
Part 3: a bug (10 min). Show the program again with the WHEN GAME
STARTS script missing. Say: "The stall used this version. The first game
was List 1 and ended on 5. Then a new child played: IN HOOP, then BELL."
Groups run it with the box still holding 5. (5 + 1 = 6; it says 6.) Ask:
"What should it have said?" (1.) "Which line is missing?" (SET score TO 0,
under WHEN GAME STARTS.) Put the script back and run the new game again:
GAME STARTS, IN HOOP, BELL. (0, 1; says 1; clap 1 time.)
Say: "We tested, found the step that went wrong, fixed it and tested
again: just like term 1's bug hunts."
Discussion questions (with answers) (5 min)
- "Why does MISS not need a script?" (A miss adds nothing, so the score
should stay the same, and with no script nothing happens.)
- "Why does the game need
SET score TO 0 at the start?" (Otherwise the
new game starts with the old game's score.)
- "Which script reads the box but does not change it?" (The BELL script.)
Closing check (with answers) (5 min)
- "GAME STARTS, GOLD, MISS, IN HOOP, IN HOOP, BELL. What is said, and how
many claps?" (3, 3, 4, 5; says 5; clap 2 times.)
- "With the start script missing, the box holds 5. Then GOLD, BELL. What
is said, and what should it be?" (8; it should be 3.)
- "Which line fixes it?" (
SET score TO 0 when the game starts.)
Vocabulary
event, variable, score, bug, test, reset (set back to 0)
Differentiation
- Support: Use only IN HOOP and MISS cards (1 point or nothing) and
leave out the IF part of the BELL script.
- Stretch: Add a new card, "BULLSEYE", and write its script so it is
worth 5. Run a list with it.
- Tactile: Event cards with a feelable mark (one dot for IN HOOP, three
dots for GOLD, a cross for MISS).
Safety
- Nothing is thrown. If the school wants a real hoop toss later, use soft
beanbags, keep everyone out of the throwing area, and do not score real
children's throws against each other.
Teacher notes and misconceptions
- Some children add 1 for MISS. Point to the program: there is no MISS
script, so nothing happens.
- Some children think "greater than 4" includes 4. Run List 3 to show that
4 gives one clap.
- The score belongs to the pretend game, not to any child.