Learn it
Code is a list of instructions that tells a computer what to do. Computers are fast, but they are not clever: they do exactly what we say, in the order we say it.
People who write code are called programmers or coders. Games, cartoons on tablets, traffic lights and robot vacuums all run on code.
- An instruction is one small step, like “move forward”.
- A program is a list of instructions that work together.
π§° Tool: free Scratch online editor (no account needed to try; a parent can create one to save projects) or the free ScratchJr app for tablets.
Code examples
Instructions for a robot friend
1. Stand up
2. Walk 3 steps forward
3. Turn to the left
4. Clap 2 times
5. Sit down
Each line is one instruction. A robot would do them from top to bottom.
Project: Be the robot
- Ask a grown-up or friend to be the robot. They may only do exactly what you say.
- Write 5 instructions to get them from the door to a chair.
- Read your instructions out loud, one at a time.
- Did the robot reach the chair? If not, change one instruction and try again.
Challenge: Make your robot pick up a soft toy on the way.