13
Lesson 13 of 20 ยท When Something Happens
When Something Happens โ Part 20
When we run, things happen. One event, then actions. This is part 20 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 When Something Happens for Kindergarten
Get the full When Something Happens track as a printable PDF โ all lessons, worksheets, and answer keys.
