Getting Started with Scratch
A beginner Scratch coding lesson for kids ages 7-10: learn what Scratch is, how to snap blocks together, move a sprite, and make your first project. With a quiz.
Key takeaways
- Scratch is a free coding tool that uses colorful blocks you snap together
- A sprite is a character or object you control with code
- Scripts run when you click the green flag and start from a hat block like 'when green flag clicked'
- You can stack blocks to make a sprite move, talk, and play sounds
What is Scratch?
Scratch is a free tool that lets you make your own games, stories, and animations. It was made by the MIT Media Lab, and millions of kids use it.
The best part? You do not type code. Instead, you drag colorful blocks and snap them together like puzzle pieces.
Meet the sprite
When you open Scratch, you see a cat. The cat is a sprite.
A sprite is a character or object you control with your code. You can have many sprites, and you can pick different ones, like a dog, a ball, or a person.
The big white area on the right is the stage. That is where your sprite moves around.
Blocks that snap together
On the left you see lots of colored blocks. Each color is a group:
- Motion (blue) — move and turn the sprite
- Looks (purple) — make the sprite say things or change
- Sound (pink) — play sounds
- Events (yellow) — start the code
You drag a block into the middle area and click it to see what it does.
Your first script
Let's make the cat move and talk. Snap these blocks together in order:
when green flag clicked
move 10 steps
say "Hello!" for 2 seconds
Here is what each block does:
- when green flag clicked — this is a hat block. It waits for you to click the green flag.
- move 10 steps — the sprite moves forward a little.
- say "Hello!" for 2 seconds — a speech bubble pops up.
Now click the green flag at the top. The cat moves and says hello! 🎉
Blocks run in order
Blocks in a stack run from top to bottom, one at a time. This is just like the steps you learned in Giving Instructions to a Robot.
If you put the blocks in a different order, the cat does things in a different order too.
Make it repeat
Want the cat to move again and again? Scratch has a repeat block. Try this:
when green flag clicked
repeat 10
move 10 steps
wait 0.2 seconds
The blocks inside the repeat 10 block run 10 times. The cat scoots across the stage!
You can learn much more about this idea in Loops: Making the Computer Repeat.
Keep building
Now try it yourself:
- Add a play sound block.
- Make the cat turn with a turn 15 degrees block.
- Add a second sprite and give it its own script.
You just wrote real code! When you are ready, learn to type code in Your First Python Program.
Quick quiz
Test yourself and earn XP
What is Scratch?
Scratch is a free coding tool where you snap colorful blocks together to make programs.
What is a sprite?
A sprite is a character or object, like the Scratch cat, that your code controls.
How do you usually START a Scratch program?
Clicking the green flag runs scripts that begin with the 'when green flag clicked' hat block.
What happens when you snap two blocks together and run them?
Blocks in a stack run in order from top to bottom.
FAQ
Yes. Scratch is free to use online at the official Scratch website, made by the MIT Media Lab.
No. In Scratch you drag and drop colorful blocks that snap together, so there is no typing of code.
Keep exploring
More in Coding