Week 11 — Strings in Depth & Text Processing
Welcome to your Week 11 Start Here page.
Why this matters
A public-health student cleaning a column of survey replies and a business major pulling the price out of each line of a sales log both need a program that tidies text and takes it apart without losing a character.
In plain language
Most of the data people care about arrives as text: a line in a log, a typed reply, a message in a group chat. This week you learn the tools Python gives you for working with text. A string method (a small tool that belongs to a piece of text and is called with a dot) can turn text into capitals, trim its ends, or cut it into pieces. Every one of these tools hands you a new piece of text and leaves the old one exactly as it was. As always, you predict what each program prints and then run it to check.
- Already covered: strings and slices from Week 3, and lists from Week 9.
- This week: string methods, split and join, find, replace, and count.
- How they connect: split hands you a list; every method hands back new text.
- Where we're going next: Week 12, files and exceptions.
Focus
How do you take a line of text apart, tidy it, and put it back together?
By the end of this module, you should be able to:
- [ ] predict what a string method hands back
- [ ] split a line, convert a piece, and rejoin it
- [ ] read find as a position or minus 1, not True or False
To-do
Plan your week
- Read Chapter 11 (about 45 minutes), then the lecture and slides.
- Work the lecture tutorial (60–90 minutes) and the practice set (about 20 minutes).
- Do the Coding Lab (about 90 minutes), the discussion, and the assignment.
- Take the quiz.
This week's checkpoint: predict what s = "Hello" then s.upper() then print(s) prints, run it, and explain why.
You've got this
Predict, then run, and ask your instructor if a step snags.
Built with The Course Maker · samples.thecoursemaker.com