CS110: Winter 2021

Intro to Computer Programming with Python

CS110: Winter 2021

Lessons > 16. Files and Strings: Part 1

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

1. Download the Exercise Files

Exercise Files

2. Review the Slides

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

3. Review the Lecture Video(s)

Link Type Title Duration
Video 1 required L16a: String & List Functions 10:05
Video 2 required L16b: Reading & Writing Files 8:00
Video 3 required L16c: Some Example Programs 5:26
Video 4 lecture Live Lecture 49:21

4. Review the References & 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