Home›Lesson Plans›Computer Science›Algorithms · Grade 2

Writing an Algorithm

Second graders learn that an algorithm is just a clear list of steps in the right order, using the fun example of making a sandwich, and put the steps in sequence.

Grade 2Writing an Algorithm50 minutes1 class periodUse → Modify → CreateExplicit teaching4 StandardsCSTA
Start the Lesson
Assign or share this lesson

Copy link works with Canvas, Schoology, Moodle and any other LMS — paste it in as a resource or assignment.

Lesson at a Glance

Everything you need before the bell rings

Learning Objectives

Students will be able to…

  • ✓Explain what an algorithm is.
  • ✓Put steps in order.
  • ✓See why order matters.
  • ✓Sequence the steps.
Essential Question

Put the bread on last instead of first and the sandwich falls apart. Why does the order of steps matter so much in an algorithm?

0
Lesson Phases
0
Vocabulary Terms
0
Standards Aligned
0
Interactive Task
Order the Steps · Interactive

Order the Steps

Project this and put the sandwich algorithm in order — tap each step from the bread to serving.

🥪 Put the sandwich algorithm in orderTry it
Tap the steps in order, starting with the bread.
The Lesson · Use → Modify → Create (a coding progression with Unplugged practice)

50 minutes, five moves

Tap any phase to open the teacher moves and student actions.

1

Hook — Steps in Order

5 min

If you put the bread on last instead of first, your sandwich falls apart. Why does the order of steps matter so much?

👩‍🏫 Teacher Moves

  • Mime making a sandwich wrong.
  • Ask what went wrong.
  • Set the goal.

🎒 Student Actions

  • Watch.
  • Share.
  • Get ready.
2

Use — Order the Steps

12 min

Students put the sandwich algorithm in order.

👩‍🏫 Teacher Moves

  • Send students to Order the Steps.
  • Order the steps.
  • Name each one.

🎒 Student Actions

  • Order.
  • Say.
  • Note it.
3

Modify — What If We Swap?

13 min

Students test out-of-order steps.

👩‍🏫 Teacher Moves

  • Pick two steps.
  • Swap their order.
  • Say what would go wrong.

🎒 Student Actions

  • Pick.
  • Swap.
  • Say.
4

Create — My Own Algorithm

15 min

Students write a simple algorithm.

👩‍🏫 Teacher Moves

  • Pick an everyday task.
  • List the steps in order.
  • Number each step.

🎒 Student Actions

  • Pick.
  • List.
  • Number.
5

Reflect — Clear Steps in Order

5 min

Students reflect on algorithms.

👩‍🏫 Teacher Moves

  • What is an algorithm?
  • Why does the order of steps matter?
  • Complete the exit ticket.

🎒 Student Actions

  • Say it.
  • Say it.
  • Complete the exit ticket.
Standards Alignment

Built to the standards you report on

Aligned to the CSTA K-12 Computer Science Standards and ISTE Standards for Students.

CSTA
1A-AP-10

Develop programs that express a sequence of steps to accomplish a task.

CSTA
1A-AP-11

Decompose the steps needed to solve a problem into a precise sequence.

CSTA
1A-AP-08

Model the way an algorithm follows a clear order of steps.

ISTE
5

Break a task into an ordered sequence of steps that a computer could follow.

Differentiation

One lesson, every learner

Multilingual Learners

ELL / EMERGING READERS
  • Step picture cards.
  • Sentence frame: “First ___ , then ___ .”
  • Order two steps at a time.

Support & Access

IEP / 504
  • Start with first and last steps.
  • Act out the steps together.
  • Add one step at a time.

Stretch & Extend

GIFTED / EARLY FINISHERS
  • Write an algorithm with a loop (repeat).
  • Find a missing step in an algorithm.
  • Compare two algorithms for the same task.
Materials

What to gather

  • 📽️Projector / board
  • 🖼️Step picture cards
  • 💻Order the Steps
  • 🥪Pretend sandwich parts
  • ✏️Pencils
  • 🎫Exit-ticket slips
Vocabulary

Key terms — hover for a quick definition

algorithma clear set of steps, in order, to do a tasksequencethe order that steps happen instepone action in an algorithmorderwhich step comes first, next, and lastinstructiona single direction telling you what to dotaskthe job you are trying to finishpreciseexact and clear, with no guessingdecomposeto break a task into smaller steps
Evaluate

Exit Ticket

Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students.

QUESTION 1
What is an algorithm?
A clear set of steps, in the right order, to finish a task.
QUESTION 2
Why does the order of steps matter?
Steps done out of order can go wrong, like putting the top bread on before the filling.
QUESTION 3
Name an everyday task that follows an algorithm.
For example, brushing teeth, tying shoes, or making a sandwich (answers vary).

Create: my own algorithm.

Have students pick an everyday task, list its steps in order, and number each one, so they see an algorithm as something they write. A printable algorithm worksheet is in the Computer Science library.

Study · Flashcards

Study the key terms

Tap a card to flip it, then rate whether you knew it. Built from this lesson’s vocabulary.

🃏 Writing an AlgorithmFlip
Card 1
Term
Tap to flip →
Meaning
0

Nice work!

Practice · Quiz

Check your understanding

A quick self-check with instant feedback, drawn from this lesson’s key terms.

📝 Writing an AlgorithmQuiz
Score: 0
1 / 6
Question 1
0%

Nice work!

Practice · Worksheet

Printable worksheet

A print-and-go review sheet with a built-in answer key. Tap “Show answer key” to reveal answers, or print the clean version for students.

🖨️ Writing an AlgorithmPrint
Name: ________________________
Date: ____________

Part A · Write the word that matches each meaning

Word bank: algorithm, decompose, instruction, order, precise, sequence, step, task
  1. which step comes first, next, and last
  2. a single direction telling you what to do
  3. exact and clear, with no guessing
  4. to break a task into smaller steps
  5. one action in an algorithm
  6. the job you are trying to finish
  7. a clear set of steps, in order, to do a task
  8. the order that steps happen in

Part B · Show what you learned

  1. What is an algorithm?
  2. Why does the order of steps matter?
  3. Name an everyday task that follows an algorithm.
Answer key — Part A: 1) order · 2) instruction · 3) precise · 4) decompose · 5) step · 6) task · 7) algorithm · 8) sequence
Part B: 1) A clear set of steps, in the right order, to finish a task. 2) Steps done out of order can go wrong, like putting the top bread on before the filling. 3) For example, brushing teeth, tying shoes, or making a sandwich (answers vary).