Programming with Sequence and Events
Programming with Sequence and Events
This item has no instructions
Our learning goal
I can explain how sequence puts instructions in order and how events make actions happen in a program.
This item has no instructions
What words come to mind when you hear coding instructions?
Use this to activate prior knowledge. Expect words such as order, computer, steps, code, game, click, key or robot. Pick out any ideas linked to sequence or events and connect them to the learning goal.
Lesson introduction
This KS2 computing lesson explores Programming with Sequence and Events. Pupils create programs in which instructions run in a purposeful order and events trigger actions. It is suitable for classroom teaching, independent practice or a clear recap of the topic.
This item has no instructions
What is a program?
A program is a set of instructions a computer can follow.
The computer follows each instruction exactly
Clear instructions help the program work properly
The order of instructions matters
Link to everyday routines such as brushing teeth or making toast: if the steps are out of order, the result goes wrong. Keep the focus on computing by bringing it back to instructions in code.
Sequence means order
Sequence is the order in which instructions run.
When a program starts, it follows the steps one by one. If the order changes, the result can change too.
A common misconception is that all code happens at once. Emphasise that sequence is about one instruction following another in the planned order.
Sequence in everyday life
Put bread on the plate
Add filling
Put the second slice on top
These steps need the right order. Programs work in the same way.
Use this slide to bridge prior knowledge to computing. You can ask pupils to notice what would happen if step 3 came first, but do not add a formal activity on the slide.
Sequence in a simple program
A sprite might follow this sequence:
Start
Move 10 steps
Turn right
Say "Hello"
Each instruction happens after the one before it.
If helpful, mention block-based programming such as Scratch, which many UK primary pupils may know. Keep the example concrete and easy to picture.
When sequence goes wrong
If instructions are in the wrong order, the program may not do what we want.
A character might speak too soon
An object might move before it appears
The program can seem confusing
Stress that bugs are often caused by the wrong sequence, not just 'broken computers'. This sets up why careful planning matters.
Why does sequence matter in a program?
It chooses colours
It orders steps
It makes sounds
It draws sprites
Checks the main idea from slides 3 to 7: sequence is the order instructions run in. Distractors are things programs may do, but not what sequence means.
Complete the explanation
A program is a set of instructions a computer can follow. Sequence means the order of the steps. If the order is wrong, the result can change.
This reinforces key vocabulary from the first teaching block. Support less confident pupils by rereading the key words from the earlier slides.
What could go wrong if coding steps are in the wrong order?
Expected answer elements: instructions in the wrong order, for example a character speaking too soon or an object moving before it appears. Accept any sensible example linked to order.
What is an event?
An event is something that starts an action in a program.
The action does not happen until the event happens.
Keep the definition short and precise. Pupils often mix up an action with an event; here, the event is the trigger, not the response.
Events are triggers
Examples of events:
pressing a key
clicking a button
tapping the screen
the timer reaching zero
You may model the phrase 'trigger' as a helpful synonym, but keep using 'event' consistently on the slides.
Event → action
Press space bar → sprite jumps
Click green flag → program starts
Timer ends → message appears
An event tells the program when to do something.
This is one of the few places where arrow notation is useful because the trigger-response chain is the whole point.
Events make programs interactive
Without events, a program only follows its starting sequence.
With events, the program can react to the user or to something happening in the program.
Make the contrast clear: sequence gives order; events let the program respond. That distinction is central to the lesson.
Which one is an event in a program?
Turn right
Press a key
Say hello
Move 10 steps
Tests the difference between an event and an action. The correct answer is the trigger; the others are actions a sprite might do.
Fill in the key words
An event starts an action in a program. Pressing a key can trigger something to happen. Events help a program react to the user or to something happening in the program.
Echoes the wording of slides 8 to 11 and reinforces event, trigger and user as load-bearing terms.
Which event would best start a game?
Green flag
Turn right
Say hello
Move 10 steps
This item has no instructions
Sequence and events together
Most programs use both ideas.
An event starts something
Then a sequence of instructions runs
Another event can start a different sequence
This slide is the turning point of the lesson: pupils should now see that events and sequence are partners, not separate topics.
Example: a simple game
Click green flag to begin
Character appears
Press arrow key to move
Touch the star to score a point
Show "Well done!" at the end
Highlight which parts are events (click, press, touch) and which parts are sequences that follow them.
Planning a program
Before coding, it helps to decide:
What should happen first?
Which events will trigger actions?
What should the program do after each event?
Planning helps the program make sense.
This supports clear instruction and leads naturally into any later practical task. It stays within computing by focusing on program structure.
Checking and improving code
When a program does not work, check:
Is the sequence in the right order?
Is the correct event being used?
Does the action happen after the event?
Frame debugging as careful checking rather than failure. For KS2, keep examples concrete and visible.
In a simple game, what happens first?
Score a point
Show Well done!
Click green flag
Press arrow key
Application of sequence and events together from slides 12 to 15. Pupils should spot that the starting event happens before the later actions.
Plan the program
Most programs use both ideas. An event starts something, then a sequence of instructions runs. When checking code, we can test the order and the correct trigger.
This check-in ties together the planning and debugging slides. It supports the application task by emphasising event, sequence and order.
Plan one small game action using an event and ordered steps.
Expected answer elements: a simple plan naming an event and what happens next in order, for example 'Click green flag, character appears, press key, character moves'. This functions as the lesson's application task. Differentiate by accepting a spoken or very short written plan from pupils who need support, and encouraging extra detail from confident pupils.
What is one thing you learned today?
Reflection only. Invite brief answers about sequence, events, triggers, planning or debugging.
What helped you understand sequence or events best?
Reflection only. Encourage pupils to mention examples, the game sequence, or the event-action idea if helpful.
How confident do you feel about sequence and events now?
This item has no instructions
Glossary
program - a set of instructions a computer can follow
instruction - a single command in a program
sequence - the order in which instructions run
event - something that starts an action in a program
trigger - another word for the event that starts an action
action - what the program does after an event
debugging - finding and fixing problems in a program
This item has no instructions