Coding with Scratch
What coding and algorithms are, what Scratch is, and how to build your first block program.
Coding means giving a computer step-by-step instructions. Let's start with Scratch. Coding, or programming, means writing instructions that a computer follows, step by step. Every app, game and website you use was made by people writing code.
New word: Algorithm
An algorithm is a list of steps to do a task. A recipe for jollof rice is an algorithm. Wash the rice, make the stew, add the rice, and cook. Computers need steps that are just as clear, in the right order.
What is Scratch?
Scratch is a free coding tool, made at M I T in America, and used by millions of children and adults around the world. Instead of typing code, you snap blocks together like puzzle pieces. You can make games, animations, stories and greeting cards. It runs in a web browser at scratch dot M I T dot E D U, and works best on a computer or tablet.
Your first program
Here's a tiny program. It starts with a yellow hat block, when green flag clicked. That's how the program begins. Next, move ten steps. The character, called a sprite, moves a little to the right. Then, say hello for two seconds. A speech bubble appears.
Getting started
To try it, go to scratch dot M I T dot E D U. Click Create to open the editor. Drag blocks from the left into the middle, and snap them together. Then click the green flag to run your program. You can make an account to save your work. If you're under sixteen, you'll need a parent's email address.
Quick check
Quick check. What is an algorithm? A list of steps to do a task, in the right order. Options: A list of steps to do a task; A type of computer virus; A phone brand; A kind of dance.
Recap
Coding is writing step by step instructions for a computer. An algorithm is a list of steps. Scratch uses blocks that snap together. And the green flag runs your program.
Key points
- Coding (programming) means writing step-by-step instructions that a computer follows.
- An algorithm is a list of steps to do a task, like a recipe. Order matters.
- Scratch is a free tool from MIT where you snap code blocks together. It works best on a computer or tablet at scratch.mit.edu.
- Programs often start with "when green flag clicked". Under 16s need a parent's email to make an account.
Try it: Think like a programmer
Choose the best answer.