LEARN · PRACTISE · DISCOVER
Welcome to Scratch: Tour the Editor
Welcome, coder! In this course you will learn to make games, stories and animations with Scratch. Scratch is a programming language made for beginners. Instead of typing code, you snap blocks together. Each block is an instruction for the computer. In this first lesson you will explore the Scratch editor and write your very first script.
Getting started
Go to scratch.mit.edu in a web browser and click Create. The Scratch editor will open. You can start making things straight away. If you want to save your projects online, ask a parent or guardian to help you create an account.
The parts of the editor
| Part | Where it is | What it does |
|---|---|---|
| Block palette | left side | holds all the code blocks, sorted by colour |
| Code area | middle | where you drag blocks to build scripts |
| Stage | top right | where your project runs and you see the action |
| Sprite pane | bottom right | shows your characters, called sprites |
| Green flag and stop sign | above the stage | start and stop your project |
Block categories
Blocks are sorted into colourful categories. For example, Motion blocks are blue and move sprites. Looks blocks are purple and change how sprites look. Events blocks are yellow and start your scripts. Control blocks are orange and handle loops and decisions.
Your first script
A script is a stack of blocks that work together. Let’s make the Scratch Cat move and talk.
- Click Events and drag
when green flag clickedinto the code area. - Click Motion and snap
move (10) stepsunderneath it. - Click Looks and snap
say (Hello!) for (2) secondsunderneath that. - Click the green flag above the stage.
when green flag clicked
move (10) steps
say (Hello!) for (2) secondsThe cat moves a little and says “Hello!”. You are a coder!
Change the numbers
Click on the number 10 in the move block and change it to 100. Click the green flag again. The cat moves much farther! Coders experiment by changing values and watching what happens.
Order matters
Computers follow instructions in order, from the top block to the bottom block. If you put the say block first, the cat will talk before it moves. The order of blocks is called the sequence.
Example
Ella wanted her cat to say “Watch me!” and then move. She dragged the say block above the move block. Now the cat said “Watch me!” first and then zoomed across the stage. Changing the sequence changed the story.
Key takeaways
- Scratch lets you code by snapping blocks together.
- The editor has a block palette, code area, stage and sprite pane.
- A script is a stack of blocks that runs from top to bottom.
- The green flag starts a project, and the stop sign stops it.
Practice
Make the Scratch Cat say your name, then move 50 steps, then say “Bye!”. Use one when green flag clicked block to start the script.
Answer: one solution is when green flag clicked, then say (Hi, I am Sam!) for (2) seconds, then move (50) steps, then say (Bye!) for (2) seconds.