11

Lesson 11 of 20 ยท Events

Events โ€” Part 19

When key pressed or clicked, do an action. This is part 19 of 20.

What you'll learn

You will learn that events trigger actions, like dominoes โ€” one thing causes the next.

Steps

  1. 1An 'event' is something that happens โ€” like pressing a button, tapping the screen, or a program starting.
  2. 2In this code, the event is the program starting. Once it starts, it triggers a chain of actions: print Action 1, then Action 2.
  3. 3Think of it like a domino chain: one event (the push) triggers everything that follows.
  4. 4Games use events all the time: when you tap, the character jumps. When a timer ends, the level changes. Event โ†’ Action!

Key Terms

Event
Something that happens (e.g. a tap, a click, a timer finishing). Events trigger actions.
Trigger
To start something. An event triggers actions to happen.
Action
What the program does when an event happens (e.g. show a message, play a sound).
Python 3
Output
Loading Python... This may take a few seconds.

Your code runs only in your browser. No code is sent to any server. Stay safe and have fun learning!

๐Ÿ–จ๏ธ

Checkout complete lesson on Events for 2nd Grade

Get the full Events track as a printable PDF โ€” all lessons, worksheets, and answer keys.

View in Shop

Your Cart (0)

Your cart is empty

Browse our shop to find activities your kids will love

Events โ€” Part 19 โ€” Events | 2nd Grade Coding | LittleActivity | LittleActivity