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

Mutable vs Immutable

Tenth graders learn a key programming idea — some values are mutable (can be changed in place, like lists and dictionaries) and some are immutable (cannot, like strings, numbers, and tuples). This affects how data behaves in your code. They sort the types, then test it.

Grade 10Mutable vs Immutable50 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…

  • ✓Define mutable & immutable.
  • ✓Sort the types.
  • ✓See why it matters.
  • ✓Test it.
Essential Question

Can every value in your program be changed after you create it?

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

Mutable, or Immutable?

Project this and sort each into Mutable or Immutable.

🔄 Sort each — mutable, or immutable?Try it
🔄 Mutable (can change)
🔒 Immutable (can’t change)
Tap one, then tap a box.
The Lesson · Explicit teaching

50 minutes, five moves

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

1

Hook — Can It Change?

5 min

Once you make a string, can you change a letter inside it directly?

👩‍🏫 Teacher Moves

  • Pose the question.
  • Share ideas.
  • Set the goal.

🎒 Student Actions

  • Think.
  • Share.
  • Get ready.
2

Use — Mutable vs Immutable

12 min

Students learn.

👩‍🏫 Teacher Moves

  • Send students to Mutable or Immutable?
  • Sort each type.
  • Note lists change, strings don’t.

🎒 Student Actions

  • Sort.
  • Say.
  • Note it.
3

Modify — Try It

13 min

Students practice.

👩‍🏫 Teacher Moves

  • Change a list item.
  • Try to change a string letter.
  • See what happens.

🎒 Student Actions

  • List.
  • String.
  • Compare.
4

Create — Create

15 min

Students apply.

👩‍🏫 Teacher Moves

  • Pick the right type for a task.
  • Explain mutable vs immutable.
  • Use it in code.

🎒 Student Actions

  • Pick.
  • Explain.
  • Use.
5

Reflect — Reflect

5 min

Students close.

👩‍🏫 Teacher Moves

  • What is mutable?
  • Name an immutable type.
  • Complete the exit ticket.

🎒 Student Actions

  • Say it.
  • Name one.
  • 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-14

Understand data-type properties.

CSTA
3A-DA-09

Choose data structures wisely.

CSTA
3A-AP-17

Debug mutation issues.

ISTE
5c

Reason about data behavior.

Differentiation

One lesson, every learner

Multilingual Learners

ELL / EMERGING READERS
  • Mutable/immutable cards.
  • Frame: "a list is ___."
  • Demonstrate each.

Support & Access

IEP / 504
  • Sort list vs string.
  • Use 4 types.
  • Use examples.

Stretch & Extend

GIFTED / EARLY FINISHERS
  • Explore aliasing.
  • Copy vs reference.
  • Why tuples as keys.
Materials

What to gather

  • 🔄Type cards
  • 📽️Screen / board
  • 💻Mutable or Immutable?
  • 💻Python
  • 📓Notebooks
  • 🎫Exit-ticket slips
Vocabulary

Key terms — hover for a quick definition

mutablecan be changed in placeimmutablecannot be changedlistmutable collectiontupleimmutable collectionstringimmutable textintegeran immutable numberin placechanging the originalvaluethe data stored
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 does mutable mean?
It can be changed in place.
QUESTION 2
Name an immutable type.
A string, integer, boolean, or tuple.
QUESTION 3
Is a list mutable or immutable?
Mutable — you can change it.

Reflect: mutable vs immutable.

Have students test changing a list vs a string. A printable types sheet is in the CS 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.

🃏 Mutable vs ImmutableFlip
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.

📝 Mutable vs ImmutableQuiz
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.

🖨️ Mutable vs ImmutablePrint
Name: ________________________
Date: ____________

Part A · Write the word that matches each meaning

Word bank: immutable, in place, integer, list, mutable, string, tuple, value
  1. can be changed in place
  2. an immutable number
  3. changing the original
  4. mutable collection
  5. the data stored
  6. immutable collection
  7. immutable text
  8. cannot be changed

Part B · Show what you learned

  1. What does mutable mean?
  2. Name an immutable type.
  3. Is a list mutable or immutable?
Answer key — Part A: 1) mutable · 2) integer · 3) in place · 4) list · 5) value · 6) tuple · 7) string · 8) immutable
Part B: 1) It can be changed in place. 2) A string, integer, boolean, or tuple. 3) Mutable — you can change it.