Event
Also known as: event-driven
A detectable action or occurrence in a program, such as a user click, key press, or timer expiry. Events are how interactive programs—games, apps, websites—respond to user actions in real time.
💡 Intuition
Something happens (click, keypress, timer) and the program reacts.
Core Idea
Event-driven programs wait for things to happen rather than following a fixed sequence.
🔬 Example
🎯 Why It Matters
Events are how interactive programs—games, apps, websites—respond to user actions in real time.
⚠️ Common Confusion
Events can occur in any order—the program must handle any sequence.
Related Concepts
Prerequisites
Next Steps
How Event Connects to Other Ideas
To understand event, you should first be comfortable with function. Once you have a solid grasp of event, you can move on to event handler and user interface.
Go Deeper
Frequently Asked Questions
What is Event in CS Thinking?
A detectable action or occurrence in a program, such as a user click, key press, or timer expiry.
Why is Event important?
Events are how interactive programs—games, apps, websites—respond to user actions in real time.
What do students usually get wrong about Event?
Events can occur in any order—the program must handle any sequence.
What should I learn before Event?
Before studying Event, you should understand: function.