Chapter
Files, errors, and a project
<p>Keep data beyond one run, respond clearly to expected failures, and combine the course ideas.</p>
Lessons
-
Read and write text files
Use pathlib and a context manager to read or write a UTF-8 text file.
-
Errors, exceptions, and validation
Understand common exceptions, validate input, and catch only failures a program can handle.
-
Mini project: a study-session tracker
Combine functions, lists, validation, and file storage in a small study-session tracker.