Home›Lesson Plans›Computer Science›Programming · Grade 5

Coding Events

Fifth graders learn events — things that happen (a click, a key press, a score reached) that trigger code to run. “When the flag is clicked… start.” They match events to the actions they cause, then wire up their own.

Grade 5Events45 minutes1 class periodCSTA / ISTEExplicit teaching4 StandardsCSTA
Start the Lesson
Assign or share this lesson

Copy link works with Canvas, Schoology, Moodle and any other LMS — paste it in as a resource or assignment.

Lesson at a Glance

Everything you need before the bell rings

Learning Objectives

Students will be able to…

  • ✓Explain what an event is.
  • ✓Match events to actions.
  • ✓Use a “when ___” event block.
  • ✓Make a program react.
Essential Question

How do programs respond to things that happen?

0
Lesson Phases
0
Vocabulary Terms
0
Standards Aligned
0
Interactive Task
Match It · Interactive

Match the Event to the Action

Project this and match each event to what it makes happen — tap the event, then tap the action.

⚡ Match each event to the action it triggersTry it
Event
Action it triggers
Now tap the action!
The Lesson · Use → Modify → Create (a coding progression with Unplugged practice)

45 minutes, five moves

Tap any phase to open the teacher moves and student actions.

1

Hook — When This, Do That

5 min

What makes a game start, or a character jump?

👩‍🏫 Teacher Moves

  • Click a flag; press a key.
  • Ask “what made that happen?”
  • Set the goal.

🎒 Student Actions

  • Watch.
  • Guess.
  • Get ready.
2

Use — Events

10 min

Students use events.

👩‍🏫 Teacher Moves

  • Send students to Match the Event.
  • Match each one.
  • Note “when ___” triggers code.

🎒 Student Actions

  • Match.
  • Say.
  • Note it.
3

Modify — Swap the Action

12 min

Students modify.

👩‍🏫 Teacher Moves

  • Change what the up-arrow does.
  • Make a click play a different sound.
  • Test the change.

🎒 Student Actions

  • Change.
  • Change.
  • Test.
4

Create — Make Your Own

12 min

Students create.

👩‍🏫 Teacher Moves

  • Pick an event (key, click, score).
  • Choose an action.
  • Wire “when ___ → do ___.”

🎒 Student Actions

  • Pick.
  • Choose.
  • Wire it.
5

Reflect — Reflect

6 min

Students close.

👩‍🏫 Teacher Moves

  • Say what an event is.
  • Name an event in a game.
  • Complete the exit ticket.

🎒 Student Actions

  • Say it.
  • Name one.
  • Complete the exit ticket.
Standards Alignment

Built to the standards you report on

Aligned to the CSTA K-12 Computer Science Standards and the ISTE Standards for Students.

CSTA
1B-AP-10

Create programs with sequences, events, loops & conditionals.

CSTA
1B-AP-12

Modify or remix programs to develop something new.

CSTA
1B-AP-15

Test and debug a program to ensure it runs.

ISTE
5 Computational Thinker

Use events to build interactive solutions.

Differentiation

One lesson, every learner

Multilingual Learners

ELL / EMERGING READERS
  • Act out “when I clap, you jump.”
  • Frame: “when ___, then ___.”
  • Match pictures first.

Support & Access

IEP / 504
  • Start with the flag event.
  • Match one pair at a time.
  • Use block cutouts.

Stretch & Extend

GIFTED / EARLY FINISHERS
  • Add two events to one sprite.
  • Chain an event to a variable.
  • Explain events vs loops.
Materials

What to gather

  • 📽️Screen / board
  • ⚡Event & action cards
  • 💻Match the Event
  • 🎮Scratch or paper blocks
  • 📓Notebooks
  • 🎫Exit-ticket slips
Vocabulary

Key terms — hover for a quick definition

eventsomething that happens that triggers codetriggerto cause code to runwhen blocka block that starts code on an eventclicka mouse eventkey pressa keyboard eventactionwhat the code does in responseinteractiveresponds to the userspritea character or object you can control
Evaluate

Exit Ticket

Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students.

QUESTION 1
What is an event?
Something that happens (a click, key, or score) that triggers code.
QUESTION 2
What does “when the flag is clicked” do?
It starts the program.
QUESTION 3
Give one game event.
E.g. pressing a key makes the player jump.

Reflect: events.

Have students name one event and the action it triggers in a game they like. A printable events worksheet is in the Computer Science library.

Study · Flashcards

Study the key terms

Tap a card to flip it, then rate whether you knew it. Built from this lesson’s vocabulary.

🃏 CS Events (Grade 5)Flip
Card 1
Term
Tap to flip →
Meaning
0

Nice work!

Practice · Quiz

Check your understanding

A quick self-check with instant feedback, drawn from this lesson’s key terms.

📝 CS Events (Grade 5)Quiz
Score: 0
1 / 6
Question 1
0%

Nice work!

Practice · Worksheet

Printable worksheet

A print-and-go review sheet with a built-in answer key. Tap “Show answer key” to reveal answers, or print the clean version for students.

🖨️ CS Events (Grade 5)Print
Name: ________________________
Date: ____________

Part A · Write the word that matches each meaning

Word bank: action, click, event, interactive, key press, sprite, trigger, when block
  1. to cause code to run
  2. a block that starts code on an event
  3. something that happens that triggers code
  4. a keyboard event
  5. responds to the user
  6. a mouse event
  7. what the code does in response
  8. a character or object you can control

Part B · Show what you learned

  1. What is an event?
  2. What does “when the flag is clicked” do?
  3. Give one game event.
Answer key — Part A: 1) trigger · 2) when block · 3) event · 4) key press · 5) interactive · 6) click · 7) action · 8) sprite
Part B: 1) Something that happens (a click, key, or score) that triggers code. 2) It starts the program. 3) E.g. pressing a key makes the player jump.