CS110: Fall 2021

Intro to Computer Programming with Python

CS110: Fall 2021

Lessons > 18. Files and Strings

Today, you will be learning to work with files – including reading them, writing them, and appending to them. Because many file formats involve text, you will also be learning to work with some common string functions.

One of the most important skills of a programmer is understanding how to do data manipulation across a variety of contexts and formats. Given that a vast quantity of data is stored in files, databases, etc., learning to access, manipulate, and write data in various formats for subsequent storage is a critical programming skill.

Today's Activities

For today, please do the following:

1. Download the Exercise Files

Exercise Files

2. Review the Slides

  1. Working with Files
  2. Supplementary Slides for Live Lecture

3. Watch the Lecture Video(s)

Link Title Type Duration
Video 1 L18a: String & List Functions pre-recorded 10:05
Video 2 L18b: Reading & Writing Files pre-recorded 8:00
Video 3 L18c: Some Example Programs pre-recorded 5:39
Video 4 Practice working with files and string functions lecture 49:52

4. Review / Study the Supplemental Materials

Note: these readings / videos are suggested for additional context / examples, but not required.

  1. Severance Ch6: Strings.
    readingvideo
  2. Severance Ch7: Files.
    readingvideo