Blocks are puzzle-shaped shapes that are used to create code in Scratch. As said above, the blocks fit together like a jigsaw puzzle where each data type (event, command, reported value, reported Boolean, or script end) has its own shape and a specially shaped slot for it to be inserted into – eliminating the typing errors that tend to occur when people use text-based programming languages. A series of connected blocks form scripts.

There are six different type of blocks classified on the basis of their shapes:

  • Hat blocks: These blocks start every script. They are shaped with a rounded top and a bump at the bottom. This is so you can only place blocks below them.
  • Stack blocks: These are the blocks that perform the main commands. They are shaped with a notch at the top and a bump on the bottom. This is so that blocks can be placed both above and below them.
  • Boolean blocks: These blocks contain conditional statements — they are either true or false. It’s like asking your friend: “Does 2 + 2 = 4?”, and they would either tell you “Yes” or “No”. They (the blocks) have a hexagonal shape.
  • Reporter blocks: Reporter blocks can values, both numbers and strings (collection of characters). They are rounded at edges.
  • C blocks are blocks that take the shape of “C’s”. Also known as “Wrap blocks”, these blocks loop the blocks within the Cs or check if a condition is true. C blocks can be bumped at the bottom, or capped.
  • Cap blocks are the blocks that end scripts. They are shaped with a notch at the top and a flat bottom — this is so you cannot place any blocks below them.

Blocks are also classified into 10 types on the basis of the functions they perform. The ten categories (palettes): Motion, Looks, Sound, Pen, Data, Events, Control, Sensing, Operators, and More Blocks. Blocks are colour coded to help you find related blocks easily. For most of the blocks, the name suggests the functions they perform:

  • Motion:  They are color-coded medium-blue, and as the name suggests, are used to control a sprite’s movement. They are available only for sprites.
  • Looks: are color-coded purple, and are used to control a sprite’s appearance.
  • Sound: are color-coded pink, and are used to control sound and MIDI functions.
  • Pen: are color-coded dark-green, and are used to control the pen aspect of the Scratch Program. The Pen is a feature in Scratch that allows a Sprite to draw shapes, plot coloured pixels, and so forth on the screen with the Pen Blocks.
  • Variables and List: Variables blocks: are color-coded orange, and are used to hold values and strings in variables, as well as display those using monitors. List blocks are a subcategory of the Variable blocks group. They are color-coded red, and are used to manipulate lists.
  • Event: are color-coded burnt orange and are used to sense events which trigger scripts to run.
  • Control: are color-coded gold, and are used to control scripts. Events blocks are color-coded burnt orange and are used to sense events, which trigger scripts to run. Event blocks are essential for every project: without the hat blocks from this category, a project would not be able to begin except by manually running scripts.
  • Sensing: are color-coded light-blue, and are used to detect different factors of a project.
  • Operators: are color-coded light-green, and are used to script math equations and string handling.
  • Robots: are colour coded light-blue, and are used for evive (or Arduino) functions.