Home›Lesson Plans›Computer Science›Programming · Grade 10

Recursion

Tenth graders meet recursion — a function that solves a problem by calling itself on a smaller version, until it reaches a base case that stops it. Think Russian nesting dolls, or factorial. They test the idea, then trace and write a recursive function.

Grade 10Recursion55 minutes1 class periodCSTA / ISTEExplicit 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 recursion.
  • ✓Identify the base case.
  • ✓Trace a recursive call.
  • ✓Write a recursive function.
Essential Question

How can a function solve a problem by calling itself?

0
Lesson Phases
0
Vocabulary Terms
0
Standards Aligned
0
Interactive Task
Check It · Interactive

Understand Recursion

Project each item and have students answer about recursion.

🔁 Understand how recursion worksTry it
Answer each question about recursion.
The Lesson · Use → Modify → Create (a coding progression with Unplugged practice)

55 minutes, five moves

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

1

Hook — Dolls Within Dolls

6 min

How do you open a stack of nesting dolls?

👩‍🏫 Teacher Moves

  • Show nesting dolls.
  • Ask about the smallest one.
  • Set the goal.

🎒 Student Actions

  • Look.
  • Guess.
  • Get ready.
2

Use — Recursion

13 min

Students use the idea.

👩‍🏫 Teacher Moves

  • Send students to Understand Recursion.
  • Note calls itself + base case.
  • Trace factorial(3).

🎒 Student Actions

  • Answer.
  • Note it.
  • Trace.
3

Modify — Trace It

14 min

Students modify.

👩‍🏫 Teacher Moves

  • Expand factorial(3) step by step.
  • Change the base case; see the effect.
  • Spot an infinite recursion risk.

🎒 Student Actions

  • Expand.
  • Change.
  • Spot.
4

Create — Write It

15 min

Students create.

👩‍🏫 Teacher Moves

  • Write a recursive function (countdown).
  • Give it a base case.
  • Test a few inputs.

🎒 Student Actions

  • Write.
  • Base.
  • Test.
5

Reflect — Reflect

7 min

Students close.

👩‍🏫 Teacher Moves

  • Say what recursion is.
  • Say why a base case matters.
  • Complete the exit ticket.

🎒 Student Actions

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

Built to the standards you report on

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

CSTA
3A-AP-15

Iteratively develop programs using control structures.

CSTA
3A-AP-17

Decompose problems into smaller same-shaped parts.

CSTA
3A-AP-14

Use procedures to reduce complexity.

ISTE
5 Computational Thinker

Decompose problems recursively.

Differentiation

One lesson, every learner

Multilingual Learners

ELL / EMERGING READERS
  • Use nesting dolls.
  • Frame: “smaller, then smaller, then stop.”
  • Trace with a picture.

Support & Access

IEP / 504
  • Use a 3-step countdown.
  • Identify the stop case.
  • Use a trace table.

Stretch & Extend

GIFTED / EARLY FINISHERS
  • Write recursive factorial.
  • Compare recursion vs a loop.
  • Draw the call stack.
Materials

What to gather

  • 📽️Screen / board
  • 🪆Nesting dolls
  • 💻Understand Recursion
  • 🐍Python / editor
  • 📓Notebooks
  • 🎫Exit-ticket slips
Vocabulary

Key terms — hover for a quick definition

recursiona function that calls itselfbase casethe input that stops the recursionrecursive casethe step that calls itself on a smaller inputcall stackthe record of active function callsfactorialn * (n-1) * ... * 1 — a classic recursioninfinite recursionno base case reached (a bug)decomposebreak into a smaller same-shaped problemreturnpass a result back up the calls
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 a recursive function?
One that calls itself on a smaller version of the problem.
QUESTION 2
What does a base case do?
Stops the recursion so it does not run forever.
QUESTION 3
What does factorial(3) = 3 * factorial(2) show?
Breaking a problem into a smaller same-shaped problem.

Reflect: recursion.

Have students describe a recursive function and its base case. A printable recursion 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.

🃏 CS Recursion (Grade 10)Flip
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.

📝 CS Recursion (Grade 10)Quiz
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.

🖨️ CS Recursion (Grade 10)Print
Name: ________________________
Date: ____________

Part A · Write the word that matches each meaning

Word bank: base case, call stack, decompose, factorial, infinite recursion, recursion, recursive case, return
  1. break into a smaller same-shaped problem
  2. the step that calls itself on a smaller input
  3. a function that calls itself
  4. n * (n-1) * ... * 1 — a classic recursion
  5. no base case reached (a bug)
  6. pass a result back up the calls
  7. the input that stops the recursion
  8. the record of active function calls

Part B · Show what you learned

  1. What is a recursive function?
  2. What does a base case do?
  3. What does factorial(3) = 3 * factorial(2) show?
Answer key — Part A: 1) decompose · 2) recursive case · 3) recursion · 4) factorial · 5) infinite recursion · 6) return · 7) base case · 8) call stack
Part B: 1) One that calls itself on a smaller version of the problem. 2) Stops the recursion so it does not run forever. 3) Breaking a problem into a smaller same-shaped problem.