Page 119 - KEC Khaitan C5 Flipbook
P. 119
KEY CONCEPTS IN BLOCK PROGRAMMING: EVENTS AND LOOPS BLOCK
Events blocks are used to trigger actions when specific conditions are met. These blocks
allow sprites to respond to user interactions or other events during the program.
Loops blocks are used to repeat actions multiple times, which saves time and makes code
more efficient by reducing repetition.
Common Events and Loops Block
Some common events blocks are given below:
When Sprite Clicked:
Executes a block of code when the sprite is clicked by the user.
When Key Pressed:
Activates actions when a specific key (e.g., arrow keys, spacebar) is pressed.
When Sprite Touches:
Responds when the sprite touches another sprite or a
specific area on the stage.
Here are some additional Event Blocks in Code.org that can be used to trigger actions
based on specific conditions or interactions:
Introduction to Block Programming and Animation 117

