6
Lesson 6 of 20 ยท Events
Events โ Part 14
When key pressed or clicked, do an action. This is part 14 of 20.
What you'll learn
You will learn that events trigger actions, like dominoes โ one thing causes the next.
Steps
- 1An 'event' is something that happens โ like pressing a button, tapping the screen, or a program starting.
- 2In this code, the event is the program starting. Once it starts, it triggers a chain of actions: print Action 1, then Action 2.
- 3Think of it like a domino chain: one event (the push) triggers everything that follows.
- 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!
๐จ๏ธView in Shop
Checkout complete lesson on Events for 2nd Grade
Get the full Events track as a printable PDF โ all lessons, worksheets, and answer keys.
