Block AI LabCoding Playground

Block Guide 🧩

Learn what every block does, one group at a time. Tick each group off when you've got it!

0 of 13 groups learnedKeep going, you're doing great.
0%
Group 1 of 13

Events

Events start your scripts: when Run is pressed, when a key is pressed, or when the stage is clicked.

when green flag clicked

Starts your program. When you press Run, the blocks stuck underneath it go, one after another from top to bottom.

You can use two of these. They run at the same time, like two robots working together!

In Python
# In Python, your program simply runs from the top line down.

when key pressed

While your program is running, the blocks under this go every time you press that key. Great for games!

Pick the arrow keys to make something move, or "any" to react to every key.

In Python
@when_key_pressed("space")
def jump():
    say("Boing!", seconds=1)

when stage clicked

While your program is running, the blocks under this go every time someone clicks the stage.

In Python
@when_stage_clicked
def tickle():
    set_face("excited")