🧱 Block Coding with Scratch

3rd Grade 💻 Coding

What if you could program without typing a single word? In Scratch, you drag colorful blocks and snap them together like building bricks. Millions of kids around the world started coding this way. In this lesson we get to know Scratch, find out how its blocks are built and plan a first project.

Free · US Letter · no sign-up
Google Classroom Save to Pinterest Email me

What is Scratch?

Scratch is a visual programming language that was developed at the MIT Media Lab (part of the Massachusetts Institute of Technology) and released to the public in 2007. It’s free, it works in a web browser, it’s made for kids about 8 and up, and you can switch it into dozens of languages. Instead of typing code, you pick blocks from a menu and drag them into the work area. The blocks are shaped like puzzle pieces: only blocks that fit together “snap” into place, so it’s almost impossible to make a syntax error.

The Scratch screen has three main parts. On one side is the list of blocks, sorted into categories by color. In the middle is the scripts area, where you connect the blocks. And on the other side is the stage, where you see the result: the characters move, talk and play sounds. Below the stage is a list of all the sprites and backdrops.

Sprites, costumes and backdrops

Anything that moves on the stage is a sprite. When you open a new project, a default sprite appears — an orange cat, the Scratch mascot — but you can delete it, choose a sprite from the library or draw your own in the paint editor. Every sprite has its own scripts: the code that decides what it does. That way, each sprite is like an actor with its own part to play.

A sprite can have several costumes — slightly different pictures of the same character. When you switch costumes quickly, one after another, you get animation, just like a flip book. The stage has backdrops you can switch too: a forest, outer space, a classroom. Changing the backdrop is an easy way to move from level to level in a game or from scene to scene in a story.

The colors of the blocks

The blocks are sorted into categories, and each category has its own color: Motion blocks are blue (“move 10 steps,” “turn 15 degrees”), Looks blocks are purple (“say Hello! for 2 seconds,” “switch costume”), Sound blocks are pink-purple, Events blocks are yellow, Control blocks — loops, conditions and waiting — are golden orange, Sensing blocks are light blue (“touching …?”), Operators blocks (math and comparisons) are green, and Variables are orange.

A block’s shape tells you what it does. A block with a rounded hat starts a script. A regular block is a command. A block shaped like a “C” — like “repeat 10” or “if … then” — wraps around other blocks. A rounded block reports a number or text, and a pointy six-sided (hexagon) block reports true or false, so it fits exactly into the slot of a condition. The shapes teach the ideas of programming without a single word of explanation.

The stage, the axes and a first project

The stage is a rectangle 480 points wide and 360 points tall, and every spot on it has an address made of two numbers: x (left and right) and y (up and down). The center is x = 0 and y = 0. As you move right, x grows up to 240, and as you move left it drops to −240; going up, y reaches 180, and going down, −180. With these addresses you can send a sprite to an exact spot.

A first project: choose a sprite, then snap together “when green flag clicked,” “go to x: 0 y: 0,” “say Hello! I’ve been programmed! for 2 seconds,” and then a “forever” loop with “move 5 steps” and “if on edge, bounce” inside. Click the flag — the sprite talks and then walks back and forth. Now try changing the numbers, adding a sound or switching costumes with every step. That’s the power of Scratch: try it, see it right away and make it better. You can also share your projects with the Scratch community — just never include personal details, and have a parent nearby.

Key facts

  • Scratch was developed at the MIT Media Lab and released to the public in 2007.
  • Scratch is free, works in a web browser and is available in many languages.
  • In Scratch you drag colorful blocks, and only blocks that fit together snap into place.
  • The stage is 480 points wide and 360 points tall, and its center is x = 0, y = 0.
  • Switching costumes quickly creates animation.

Quick quiz

  1. How do you program in Scratch?

  2. Where was Scratch developed?

  3. What do you call anything that moves on the stage in Scratch?

  4. How do you make animation in Scratch?

  5. What is the address of the center of the stage?

  6. What color are the Events blocks in Scratch?

  7. What slot does a six-sided (hexagon) block fit into?

  8. What should you remember when you share a project with the community?

💭 Think and talk about it

  1. Plan a short Scratch story with two sprites. What does each one say, and how do they know when it’s their turn to talk?
  2. Why do you think it’s almost impossible to make a syntax error in Scratch?
  3. Which blocks would you need to make a sprite jump when you press the space key?

Questions kids ask

Is Scratch free?

Yes. Scratch is completely free, works in a web browser and also has a version you can install on a computer. It was developed at a university, not to make money.

Do I need an account to use Scratch?

No. You can open Scratch in the browser and start building right away. You only need an account (made with a parent’s help) if you want to save projects online and share them with the community.

What should I do once Scratch feels easy?

Move on to a typed language, such as Python. The ideas — sequence, conditions, loops, variables and events — stay the same; only the way you write them changes. The Python lesson is a great next step.

🔎 Ask Thinkapedia another question