Grade 3 Computer Science lesson plan Β· More Computer Science resources
Unplugged Algorithms: Program the Teacher
Without any computers, students learn that an algorithm is a precise, ordered set of steps. They 'program' the teacher to draw a shape, write arrow code to move a robot around a grid, and debug algorithms that don't work.
- 45 minutes
- Grade 3
- Computer Science
- Algorithms
- πΊπΈ United States
By the Success Tutoring Teachers team Β· Updated Β· Educator review in progress Β· How we make our resources
Overview
Learning objectives
Students willβ¦
- Explain that an algorithm is a precise, ordered set of steps to complete a task.
- Write and follow algorithms using arrow code on a grid.
- Find and fix errors (debug) in an algorithm.
- Use a repeat to make an algorithm shorter.
Success criteria
Students can sayβ¦
- I can write clear, step-by-step instructions that someone else can follow exactly.
- I can write arrow code to move from one square to another on a grid.
- I can find the bug in an algorithm and fix it.
Curriculum focus: Computational Thinking Β· State standards (Texas TEKS first)
Specific curriculum codes are added once our team has checked them against the official documents. How we align resources
Key vocabulary
- algorithm
- A precise set of steps, in order, to solve a problem or complete a task.
- sequence
- The order in which steps happen.
- program
- An algorithm written in a form a computer (or robot) can follow.
- bug
- A mistake in an algorithm or program that stops it from working as planned.
- debug
- To find and fix a bug.
- repeat (loop)
- An instruction to do some steps again a set number of times.
In the glossary: algorithm, bug, debugging, program, repetition, sequence
Materials & preparation
You will need
- Whiteboard and marker for the 'program the teacher' demonstration
- 5 Γ 5 grid printed on A4 (one per pair) with columns AβE left to right and rows 1β5 from bottom to top
- A counter or small toy per pair to act as the robot
- Arrow cards (β β β β) or pencils to draw arrows
- Optional: masking tape to make a 5 Γ 5 floor grid
- The practice sheet and exit ticket (printable)
Before the lesson
- Print the grid sheets and the practice sheet.
- Draw a large 5 Γ 5 grid on the board with the same labels as the student grid. Explain the arrow rules: β moves up one square, β down one, β right one, β left one. The robot does not turn β it slides.
- Optional: tape a floor grid with squares large enough for a student to step in. Keep it clear of desks and bags to avoid trips.
Lesson sequence
- 1
Hook: program the teacher
6 minTeacher
- Say: 'I am a robot. I can only do exactly what you tell me. Your job: get me to draw a square on the board.'
- Follow instructions literally and with humor: if told 'draw a line', draw a tiny wobbly line anywhere; if told 'pick up the marker', hold it without taking the lid off.
- After a few attempts, ask: 'Why did the robot keep getting it wrong?' (The instructions were not precise enough or were in the wrong order.)
- Introduce the word algorithm: 'A set of precise steps in the right order.'
Students
- Give instructions one at a time.
- Notice what makes instructions clear or unclear.
- 2
Explicit teaching: arrow code
9 minTeacher
- Show the board grid. Place the robot at A1 (bottom-left). Explain the four arrows.
- Model: 'I want the robot to get to C2. I'll write β β β.' Trace each step aloud: A1 to B1, B1 to C1, C1 to C2.
- Introduce repeat: 'Instead of β β β β I can write β Γ4, which means repeat right 4 times.'
- Introduce debugging: write β β β β and say 'I wanted to reach C2 but ended at C3. Let's find the bug.' Trace together to find the extra β.
Students
- Trace arrow code with a finger on their own grid.
- Call out where the robot lands.
- 3
Guided practice: pair programming
12 minTeacher
- In pairs: one student is the programmer and secretly chooses a target square, then writes arrow code from A1. The other is the robot and follows the code with a counter. Did they land on the target? Swap roles.
- Add obstacles: students draw two 'puddles' on their grid that the robot must not step on.
- Optional: use a floor grid where one student walks the code while another reads it out. Walk only, one square at a time.
- Circulate and ask: 'Is there a shorter algorithm?' 'Where is the bug?'
Students
- Write and test arrow code in pairs.
- Debug code that doesn't reach the target.
- 4
Independent practice
12 minTeacher
- Students complete the practice sheet using their grid and counter.
- Support a small group with a 3 Γ 3 grid if needed.
Students
- Complete the practice sheet.
- 5
Reflect and exit ticket
6 minTeacher
- Ask: 'Where do you see algorithms in everyday life?' (Recipes, game rules, instructions for building a model, traffic lights.)
- Students complete the exit ticket individually.
Students
- Share an everyday algorithm.
- Complete the exit ticket.
Worked examples
Writing arrow code
The robot starts at A1. Write arrow code to move it to D3.
- Work out how far across: from column A to column D is 3 squares right.
- Work out how far up: from row 1 to row 3 is 2 squares up.
- Write the steps: β β β β β (or β Γ3, β Γ2).
- Test it: A1 β B1 β C1 β D1 β D2 β D3. It works.
β β β β β (other orders of 3 rights and 2 ups also work if there are no obstacles).
Debugging an algorithm
Kai wants the robot to go from A1 to C3. He wrote β β β β β. Where does the robot end up, and how do you fix it?
- Trace step by step: β to A2, β to A3, β to B3, β to C3, β to D3.
- The robot ends at D3, one square too far right.
- The bug is one extra β.
- Remove the last arrow: β β β β.
The robot ends at D3. Fixed code: β β β β.
Practice & answers
Printable student sheet
Arrow Code Practice
Use a 5 Γ 5 grid: columns AβE go left to right, rows 1β5 go bottom to top. β up one, β down one, β right one, β left one. 'Γ3' means repeat 3 times.
- 1Start at A1. Follow β β β. Where does the robot end?
- 2Start at B2. Follow β β β β. Where does the robot end?
- 3Start at A1. Follow β Γ4, then β Γ2. Where does the robot end?
- 4Write arrow code to go from A1 to E1.
- 5Start at E5. Write arrow code to get to C4.
- 6Zara wants to get from A1 to C3 without stepping on a puddle at B2. She wrote β β β β. What is the bug? Fix it.
- 7Put these steps for planting a seed in order: cover the seed with soil; fill a pot with soil; water the soil; make a small hole; put the seed in the hole.
- 8Mei's instruction for drawing a square says: 'Draw a line. Turn. Draw a line. Turn. Draw a line. Turn. Draw a line.' Why might a robot not draw a square? Improve it.
Show answersHide answers
- C2
- C3 (B3, B4, C4, C3)
- C5
- β β β β (or β Γ4)
- β β β (any order of 2 lefts and 1 down)
- The robot goes A1 β B1 β B2, which is the puddle. A fix: β β β β (B1, C1, C2, C3), or β β β β (A2, A3, B3, C3).
- Fill a pot with soil; make a small hole; put the seed in the hole; cover the seed with soil; water the soil.
- It doesn't say how long each line is or which way or how far to turn. Better: 'Repeat 4 times: draw a line 5 cm long, turn right a quarter turn.'
Differentiation
Offer tasks by choice or quietly by invitation β avoid labelling groups by ability in front of the class.
Additional support
- Use a 3 Γ 3 grid and only β and β arrows at first.
- Give arrow cards to lay out physically before writing the code.
- Pair with a partner who reads each step aloud while the other moves the counter.
Core task
- Complete all practice questions and write one algorithm for a partner to test.
Extension challenge
- Add turning commands (turn left, turn right, move forward) where the robot faces a direction, and rewrite question 1 using them.
- Find the shortest code to collect three 'stars' placed on A3, C5 and E2 starting from A1.
- Write an algorithm with a repeat that draws a staircase pattern on the grid.
Assessment & exit ticket
Formative assessment
- Observe pair programming: do students trace code step by step to test it?
- Check debugging answers (questions 6 and 8) for identifying the exact step that causes the error.
- Use the exit ticket to check understanding of 'algorithm' and 'debug'.
Exit ticket
- What is an algorithm?
- Start at A1. Follow β β β β. Where does the robot end?
- What does 'debug' mean?
Show exit ticket answersHide answers
- A precise set of steps, in order, to complete a task or solve a problem.
- C3 (B1, B2, B3, C3)
- To find and fix a mistake (bug) in an algorithm or program.
Common misconceptions
- Computers 'know what you mean'. Computers follow instructions exactly; vague or missing steps cause bugs.
- Order doesn't matter. In many algorithms the order changes the result (e.g. putting the seed in before making the hole).
- A bug means the whole algorithm is wrong. Often only one step needs changing. Trace step by step to find it.
- Left and right from the robot's view. If the robot turns, its left and right may differ from ours. In this lesson the robot slides without turning; introduce turning as an extension.
Extension
- Write an algorithm for a classroom routine (e.g. packing up) and test it with a partner who follows it exactly.
- Try the coding game or coding quest to apply sequencing and loops on screen.
Keep the learning going
Free resources from other Success Tutoring sites that match this topic.
More lesson plans
2nd Grade Place Value to 1,200: Thousands, Hundreds, Tens and Ones, Expanded Form and Comparing
Students use base-ten blocks and place value charts to build three- and four-digit numbers up to 1,200, write them in standard, word and expanded form, show a number in more than one way, and compare and order numbers using place value and the symbols <, > and =.
Animal Life Cycles: Butterfly, Frog and Chicken, with Metamorphosis and Direct Development
Students learn that every animal has a life cycle, then follow three: a butterfly (egg, caterpillar, chrysalis, adult), a frog (eggs, tadpole, froglet, adult) and a chicken (egg, chick, adult). They compare animals that change body shape completely through metamorphosis with animals whose young look like small adults, and sequence and compare the cycles.
Healthy Eating and the Five Food Groups: Sorting Foods and Planning a Balanced Plate
Students learn what food does for our bodies and explore five food groups that most official guides share: vegetables, fruit, grains, protein foods, and dairy and alternatives. They sort paper food cards, find the groups in mixed meals, talk about water and sometimes foods, and plan a balanced lunch for a story character. Uses paper cards only; no real food.
Need a timer for this lesson? Open the Classroom Timer or make random groups.