Chapter

Files, errors, and a project

<p>Keep data beyond one run, respond clearly to expected failures, and combine the course ideas.</p>

Lessons

  1. Read and write text files

    Use pathlib and a context manager to read or write a UTF-8 text file.

  2. Errors, exceptions, and validation

    Understand common exceptions, validate input, and catch only failures a program can handle.

  3. Mini project: a study-session tracker

    Combine functions, lists, validation, and file storage in a small study-session tracker.