top of page
Scratch Events Code Block

Week: 

Level: 

Content:

Details:

7

Beginner

Scratch Events Code Block

Introducting students to the events code block. Students will  learn using "when" condition

  • Create a new project, delete the default cat character

  • Add a butterfly character

  • Add "when 'flag' clicked" code block from the Events tav to the code window

  • Add "move 10 steps" code block to the code window and change '10' to '20', then combine the blocks

  • Click flag icon to see the code executes when the condition is fulfilled

Learn using "when" condition by passing keyboard keys:

  • Delete "when 'flag' clicked" code block from the code window

  • Add "when 'space' key pressed" code block to the code window

  • Combine "move 20 steps" code block and "when 'space' key pressed" code block

  • Press Space key on the keyboard to see the code executes when the condition is fulfilled

bottom of page