Lesson 1 of 6, about 25 minutes

Meet Scratch: your coding playground

Welcome, creator! 👋 In this course you'll build games and apps that use AI. First, let's learn the tool we'll build with: Scratch.

What is Scratch?

Scratch is a free coding language made by MIT. Instead of typing code, you snap together coloured blocks, like LEGO. Millions of young people around the world use it to make games, stories and animations.

Getting started

  1. Go to scratch.mit.edu and click Create.
  2. You can start coding straight away without an account. To save your projects online you'll need an account. When a young person signs up, Scratch asks for a parent or guardian's email, so do this step with a grown-up. You can also save to your computer with File → Save to your computer.

The Scratch screen

  • Stage (top right): where your project runs.
  • Sprites (bottom right): the characters. The cat is the default sprite.
  • Block palette (left): all the blocks, sorted by colour.
  • Code area (middle): where you drag and snap blocks together.

Your first program

Drag these blocks into the code area and snap them together:

🟡 when green flag clicked (from Events)
🟣 say [Habari! I'm learning to code.] for (2) seconds (from Looks)
🔵 move (50) steps (from Motion)
🟣 say [Watch me dance!] for (2) seconds

Click the green flag above the stage. Your cat talks and moves! 🎉

What just happened?

You wrote a program: a list of instructions the computer follows in order, from top to bottom. The yellow "when green flag clicked" block is an event: it tells the program when to start.

Challenge: Change the sprite by clicking the cat-face button at the bottom right and choosing a new character. Change the backdrop too. Make your sprite introduce itself, say where it lives in Kenya, and move across the stage.

What you learned

  • Scratch lets you code with blocks.
  • A program is a list of instructions that run in order.
  • Events like "when green flag clicked" start your code.

Enjoyed this? Create a free account, then unlock all 6 lessons, the quiz and the certificate for US$28.

Unlock the full course
Chat with us