Scratch programming blocks are designed in different shapes, which can be connected to each other vertically like a jigsaw puzzle. Scripts are created by series of connected blocks. Each data type has its own shape and a specially shaped slot. There are five shapes of blocks:
- Hat blocks
- Stack blocks
- Reporter blocks
- Boolean blocks
- Cap blocks
A hat block is used to start the script, and is always placed on the top of other blocks. The following is the general shape of a Hat Block.
Each hat block uses its own way to activate a script, and therefore different scripts can be executed at different time points.
2. Stack blocks
A stack block is a rectangular block that can fit above or below other blocks, with a notch at the top and a bump on the bottom. A typical Stack Block looks like this:
Stack blocks are used to execute the main commands, and therefore are the majority among all the blocks.
3. Reporter blocks
Each reporter block contains a value that can be a numerical value or character string. The following is the general shape of a Reporter Block.
A reporter block can be used in any script that requires data but cannot be used independently. A reporter block can be fit into another block as long as the slots fit.
4. Boolean Blocks
A boolean block contains a condition, which can be either "true" or "false". A typical boolean Block is an elongated hexagon as shown in the following:
A boolean block must be put into the hexagonal slot of another block, and therefore cannot be used independently.
5. Cap blocks
A cap block ends a script or project. It can be put only under all blocks. The following is the general shape of a cap block.