Lesson 1: When something happens
Unit overview - Next: Lesson 2
About 45 minutes.
Goal
Children learn that an event is something that happens, such as a card
being shown or a bell ringing, and that an event script waits and runs
its steps only when its event happens. They trace which script runs for a
list of events.
Materials
- Event cards: green circle, red triangle, blue square (large, colour and
shape).
- A small hand bell or quiet chime, and a "bell" picture card.
- Three program cards (or the board) with the scripts below.
- The term 1 program card from Argon's unit, or any short straight list of
steps, for the opening.
- Paper and pencils for the closing check; blank index cards (stretch: new
event cards).
Steps
Opening (5 min)
- Hold up a term 1 style program (a straight list of steps). Ask: "When
does the robot do step 1? Step 2?" (Straight away, then one after the
other, top to bottom.)
- Ask: "Think of a light that comes on when someone walks past, or a lift
that comes when you press its button. Does it do things straight away,
one after another?" (No. It waits until something happens.)
- Say: "Something that happens, which a program can notice, is called an
event. Today the class is a program that waits for events."
Main activity (30 min)
Part 1: three event scripts (10 min). Put up three scripts:
WHEN the green circle card is shown:
CLAP 1 TIME
WHEN the red triangle card is shown:
TAP DESK 2 TIMES
WHEN the bell rings:
STAND UP
Read them together. Say: "Each script waits. Its steps run only when its
event happens, and every time it happens." Practise: show the green circle
(everyone claps once), the red triangle (two taps), then ring the bell while
holding up the bell picture (everyone stands; then sit down again).
Part 2: the teacher chooses the order (10 min). Run these event lists.
Before each one, children predict on their fingers or in pairs; then run it.
- List A: green, green, red. (Clap, clap, tap tap. Nobody stands.)
- List B: bell, red, green. (Stand, tap tap, clap.)
- List C: blue square. (Nothing happens: no script waits for the blue
square.)
Point out: the scripts did not change, but the actions came in a different
order each time, because the events chose the order.
Part 3: a fourth script (10 min). Add, with the class:
WHEN the blue square card is shown:
REPEAT 3 TIMES:
TAP DESK
Run List C again (three taps). Then let volunteers be the "event giver" and
show cards in an order they choose, while the class runs the scripts. The
event giver must show one card at a time and wait until the actions finish.
Discussion questions (with answers) (5 min)
- "What made the class clap?" (The green circle being shown: the event.)
- "In term 1, the program ran top to bottom. What is different today?" (The
scripts waited; the events decided which script ran and when.)
- "Why did nothing happen for the blue square at first?" (No script was
waiting for it.)
- "Name an everyday machine that waits for an event." (Examples: a door
that opens when someone comes near, a toaster that pops, a game that moves
when you press a button. Any sensible answer counts.)
Closing check (with answers) (5 min)
With the four scripts still showing, each child writes or points to an
answer.
- "I show red, then green. What happens?" (Tap tap, then clap.)
- "I ring the bell twice. How many times do you stand up?" (Twice: the
script runs every time; sit down in between.)
- "I show a yellow card. What happens?" (Nothing; no script for it.)
Vocabulary
event, event script, wait, run
Differentiation
- Support: Use only two scripts (green and bell) at first. Give the
child a copy of the scripts to touch and point to.
- Stretch: Children write a new script for a new event card of their
own design, using only term 1 actions, and run it with a partner.
- Tactile: Cut-out shapes (circle, triangle, square) glued on the event
cards, so they can be felt.
Safety
- Clear space around desks before standing. Standing is optional: raising
a hand counts.
- Use a quiet chime and allow ear defenders.
Teacher notes and misconceptions
- Some children think the scripts run in the order they are written. Run
List B to show they do not.
- Some think a script runs only once. Ring the bell twice to show it runs
every time.
- Keep the gaps between events long enough for everyone to finish.