Year 3 (ages 7–8, Grade 2 in the US) · Computing · Sequences in Scratch · Lesson 4
Events
Using events (green flag, key presses, sprite clicks) to start scripts in block-based programs, and planning interactive controls.
Exam boards: this lesson matches the AQA and Pearson Edexcel GCSE computing courses. Check which course your school follows.

13-minute video lesson
Teaching, worked examples and 20 practice questions solved step by step.
Watch free for a monthWhat your child will learn
- Define an event
- Read event-driven scripts
- Write key-control scripts
- Test and debug events
The method
- Choose event.
- On top.
- Actions.
- Test.
Key words: event, script, sprite, key press, click, block coding.
Worked examples
Worked examples from the lesson, with every step.
Question 1
When does this code run?
- Step 1: Read the code
- Step 2: hat block
Answer: when the green flag is clicked
Question 2
When does this code run?
- Step 1: Read the code
- Step 2: hat block
Answer: when the up arrow key is pressed
Question 3
What does this code do?
- Step 1: Read the code
- Step 2: y = up/down
Answer: moves the sprite up by 10