# String Methods > Ninth graders learn Python string methods — built-in tools like .upper(), .lower(), .split(), and .replace() that transform text, plus len() to count… **Computer Science** | **Grade 9** *A free lesson plan from K12 Academics. Source page: https://lessonplans.k12academics.com/k12-lesson-g9-cs-string-methods.html* Ninth graders learn Python string methods — built-in tools like .upper(), .lower(), .split(), and .replace() that transform text, plus len() to count characters. They make text processing fast and easy. They match methods to their jobs, then use them. **Copy link** works with Canvas, Schoology, Moodle and any other LMS — paste it in as a resource or assignment. ## Everything you need before the bell rings ### Learning Objectives Students will be able to… - Use **string methods**. - Transform **text**. - **Split** & replace. - Process strings. What built-in tools does Python give you for working with text? ## Match the String Method Project this and match each method to what it does — tap the method, then tap its job. ## 55 minutes, five moves Tap any phase to open the teacher moves and student actions. ### Hook — Text Tools Need to lowercase a name or split a sentence — do you code it from scratch? #### 👩‍🏫 Teacher Moves - Pose the question. - Share ideas. - Set the goal. #### 🎒 Student Actions - Think. - Share. - Get ready. ### Use — String Methods Students learn. #### 👩‍🏫 Teacher Moves - Send students to Match the String Method. - Match each one. - Note methods return new strings. #### 🎒 Student Actions - Match. - Say. - Note it. ### Modify — Use It Students practice. #### 👩‍🏫 Teacher Moves - Uppercase a word. - Split a sentence. - Replace a word. #### 🎒 Student Actions - Upper. - Split. - Replace. ### Create — Create Students apply. #### 👩‍🏫 Teacher Moves - Clean up some text. - Chain two methods. - Count characters. #### 🎒 Student Actions - Clean. - Chain. - Count. ### Reflect — Reflect Students close. #### 👩‍🏫 Teacher Moves - What does .split() do? - What does len() do? - Complete the exit ticket. #### 🎒 Student Actions - Say it. - Say it. - Complete the exit ticket. ## Built to the standards you report on Aligned to the CSTA K-12 Computer Science Standards and the ISTE Standards for Students. Use built-in methods on strings. Develop programs that process text. Test string-handling code. Use tools to manipulate data. ## One lesson, every learner ### Multilingual Learners - Method/job cards. - Frame: "upper() makes it ___." - Demo each live. ### Support & Access - Match upper & lower. - Use 3 methods. - Use examples. ### Stretch & Extend - Chain several methods. - Use .strip() and .find(). - Build a text cleaner. ### What to gather - 🔤Method cards - 📽️Screen / board - 💻Match the String Method - 💻Python - 📓Notebooks - 🎫Exit-ticket slips ### Key terms - **string**: text data - **method**: an action on a value - **.upper()**: make uppercase - **.lower()**: make lowercase - **.split()**: break into a list - **.replace()**: swap text - **len()**: count characters - **chain**: combine methods ## Exit Ticket Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students. ### Reflect: string methods. Have students clean up text using string methods. A printable method sheet is in the CS library. ## Check your understanding **1. What does “string” mean?** - combine methods - text data *(correct)* - swap text - make lowercase “string” means: text data **2. Which word means: “an action on a value”?** - .upper() - .replace() - method *(correct)* - string “method” means: an action on a value **3. What does “.upper()” mean?** - combine methods - make uppercase *(correct)* - break into a list - swap text “.upper()” means: make uppercase **4. Which word means: “make lowercase”?** - string - .upper() - .lower() *(correct)* - method “.lower()” means: make lowercase **5. What does “.split()” mean?** - an action on a value - make uppercase - count characters - break into a list *(correct)* “.split()” means: break into a list **6. Which word means: “swap text”?** - .replace() *(correct)* - len() - method - .lower() “.replace()” means: swap text ## Printable worksheet --- Full lesson page: https://lessonplans.k12academics.com/k12-lesson-g9-cs-string-methods.html All lessons: https://lessonplans.k12academics.com/