Scratch 2.0 is an example of an event-driven programming language. In event-driven programming, your computer program’s flow is determined by the occurrence and handling of events.
What is an event? For our purposes, and event is either a digital user action such as a mouse click or keyboard press, or an analog sensor input, such as a volume or light change.
Event blocks in Scratch 2.0 are absolutely crucial to the success of our program. In point of fact, our scripts simply won’t run without at least one event block-the block.
As you can see in Table 8.1, the Events palette in Scratch 2.0 ...