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

Strings

Ninth graders work with strings — text data. They join strings with +, measure them with len(), read characters by index (starting at 0), transform them with methods like .upper(), and take slices. They explore each, then process text in code.

Grade 9Strings55 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…

  • ✓Join strings with +.
  • ✓Use len() and indexing.
  • ✓Transform with methods.
  • ✓Slice a string.
Essential Question

How do programs store and manipulate text?

0
Lesson Phases
0
Vocabulary Terms
0
Standards Aligned
0
Interactive Task
Explore · Interactive

The String Explorer

Project this and tap each. Have students explore how Python handles strings.

🔤 Explore string operations — tap eachTry it

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 — Text Is Data

6 min

How could a program greet someone by name?

👩‍🏫 Teacher Moves

  • Show two pieces of text being joined.
  • Ask how to combine text.
  • Set the goal.

🎒 Student Actions

  • Look.
  • Guess.
  • Get ready.
2

Use — Strings

13 min

Students use strings.

👩‍🏫 Teacher Moves

  • Send students to the String Explorer.
  • Tap each operation.
  • Note indexing starts at 0.

🎒 Student Actions

  • Tap each.
  • Say.
  • Note it.
3

Modify — Transform It

14 min

Students modify.

👩‍🏫 Teacher Moves

  • Uppercase a string.
  • Slice out a piece.
  • Join two strings.

🎒 Student Actions

  • Upper.
  • Slice.
  • Join.
4

Create — Build

15 min

Students create.

👩‍🏫 Teacher Moves

  • Make a greeting from inputs.
  • Count the characters.
  • Slice part of it.

🎒 Student Actions

  • Build.
  • Count.
  • Slice.
5

Reflect — Reflect

7 min

Students close.

👩‍🏫 Teacher Moves

  • Say what len() returns.
  • Say the first index number.
  • 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-14

Use data and procedures to manage complexity.

CSTA
3A-AP-15

Iteratively develop programs using control structures.

CSTA
3A-AP-21

Evaluate and refine computational artifacts.

ISTE
5 Computational Thinker

Transform data to solve problems.

Differentiation

One lesson, every learner

Multilingual Learners

ELL / EMERGING READERS
  • Count characters on fingers.
  • Label index positions.
  • Say operations aloud.

Support & Access

IEP / 504
  • Start with + joining.
  • Index the first letter only.
  • Use short words.

Stretch & Extend

GIFTED / EARLY FINISHERS
  • Use .replace() and .find().
  • Format a string with f-strings.
  • Loop over characters.
Materials

What to gather

  • 📽️Screen / board
  • 🔤Index strips
  • 💻The String Explorer
  • 🐍Python / editor
  • 📓Notebooks
  • 🎫Exit-ticket slips
Vocabulary

Key terms — hover for a quick definition

stringtext data, in quotesconcatenateto join strings with +len()returns the number of charactersindexa character position (starting at 0)methoda built-in action like .upper()slicea piece of a string by index rangecharacterone letter, digit, or symbolimmutablea string cannot be changed in place
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 len of "code" return?
4.
QUESTION 2
What is the index of the first character?
0.
QUESTION 3
What does "quiet".upper() give?
"QUIET".

Reflect: strings.

Have students join two strings and print their total length. A printable strings 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 Strings (Grade 9)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 Strings (Grade 9)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 Strings (Grade 9)Print
Name: ________________________
Date: ____________

Part A · Write the word that matches each meaning

Word bank: character, concatenate, immutable, index, len(), method, slice, string
  1. returns the number of characters
  2. a built-in action like .upper()
  3. one letter, digit, or symbol
  4. a piece of a string by index range
  5. to join strings with +
  6. a character position (starting at 0)
  7. a string cannot be changed in place
  8. text data, in quotes

Part B · Show what you learned

  1. What does len of "code" return?
  2. What is the index of the first character?
  3. What does "quiet".upper() give?
Answer key — Part A: 1) len() · 2) method · 3) character · 4) slice · 5) concatenate · 6) index · 7) immutable · 8) string
Part B: 1) 4. 2) 0. 3) "QUIET".