Oct 28: String Slicing, Methods
Meet in EnGeo 2208
Learning Objectives
After today's class, you should be able to:
- Explain the syntax and meaning of slice operations, with and without indexes.
- Name four methods that strings provide, and describe what each method does.
- Describe where to find the official documentation for methods of built-in types.
Lesson Outline
Presentation [10 min]
- Slicing a string and review of string methods
Mini Lecture [25 min]
- String methods:
strip(),split(),join() - Practice reading and parsing data from files
Q1–Q3 [15 min]
- Expression type and value
- Ranges and list loops
- List contents/methods
Your To-Do List
- Prepare to retake Quiz 3 (4–6)
- Required before Friday's class:
- Read Chapter 8 of Python for Everyone (
mayfield1) Section 8.1 PersistencetoSection 8.10 Summary- Do every activity and mark each section as completed
- Read Chapter 8 of Python for Everyone (
- Required before Monday's class:
- PA3: Gift Swap OR PA3: Trivia Night
- Submit to Gradescope until you get 100%
- Don't use AI; visit TA Hours to get help