Simple Programs: Sequences and Instructions
Write, run and fix simple programs by putting instructions in order: plan a sequence of steps, predict what the program will do before running it, and hunt down the step that went wrong when it doesn't behave as expected
What a learner can do afterwards
- Build a short program by arranging instructions in order (e.g., move forward, turn left, move forward to guide a floor robot to a goal)
- Predict what a simple program will do before pressing run, then check the prediction against what actually happens
- Find and fix the wrong or missing step when a program doesn't do what was intended, rather than starting again from scratch
The lesson
A program is a list of steps. You put steps in order, then press run.
Ben plans a program: forward, forward, turn right. He guesses what will happen, then runs it to check.
Guess what will happen before you press run. Then check if your guess was right.
If the robot goes wrong, look at each step. Find the one step that is wrong, then fix it.
Plan your steps, guess what happens, then fix only the wrong step.
Watch it
Where it sits
Learn first
This opens up
Where this leads
Jobs that lean on this skill. Follow one to see everything it is built on.
8 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.