Visual Programming (Scratch)
What's covered
Key facts
Blocks, Sprites and the Stage
The shape in Scratch that snaps to other lines of code is called a block.
Broadcasts and Messages
The broadcast () and wait block pauses the sending script until every receiving script has finished; the plain broadcast () block lets the sender continue immediately.
Events and Triggers
Code that runs in response to a user action is triggered by an event.
Loops and Conditionals in Scratch
A forever block does not stop after one run — it runs its contents endlessly.
Variables in Scratch
The change [score] by 1 block changes a variable's value by a given amount.
Blocks, Sprites and the Stage
Each sprite's blocks live in that sprite's own code (scripts) area.
Broadcasts and Messages
Scratch cannot limit where a broadcast goes: every script with a matching when I receive hat runs. Sending a message to just one sprite needs a workaround, such as a variable that each sprite checks.
Events and Triggers
An event in Scratch is something that triggers code to run.
Loops and Conditionals in Scratch
The forever block repeats the code inside it endlessly.
Variables in Scratch
The set [variable] to 0 block resets the variable's value to 0.
Sample questions
A taste of the 43 questions in this topic, answers marked. Sign up to practise the full set with spaced repetition.
How is code built in Scratch?
- •By drawing arrows on the screen
- •By recording audio commands
- ✓By snapping blocks together
- •By typing lines of text code
Which block receives a broadcast?
- •Move 10 steps block always
- •Wait 1 second block always
- •When green flag clicked block
- ✓When I receive (message) block
What does 'When green flag clicked' do in Scratch?
- •Broadcasts a message to other sprites
- •Resets all variables to zero
- ✓Starts the program running
- •Stops all scripts immediately
Which block runs code a fixed number of times?
- •Move 10 steps block
- ✓Repeat 10 block
- •Say hello block
- •Wait 10 seconds block
Which block sets a variable's value?
- •Move 10 steps block
- •Say hello block
- ✓Set score to 0 block
- •Wait 1 second block
Where do the blocks for a sprite live?
- •In the printer's paper tray
- ✓In the sprite's code area
- •In the system clock display only
- •In the user's email account
Try it for four weeks. Free.
One school. Unlimited classes. No card limit. No teacher limit. If your students aren't practising daily by the end of the trial, you owe us nothing.