5. The Anatomy of a Python programΒΆ

This section details the parts of a typical Python program, introducing some basic Python structures and concepts.

Python program structure.

  1. How does a program connect to other programs?
  2. How do we read a program and recgnize its structure?
  3. A key answer to question 2 is that well-written complex programs are broken up into functions. We learn a bit more about how to read, write, and understand functions.
  4. We learn about classes. We have been using Python classes all along without making much of it. We learn about how a user can define classes, and a bit about when one would want to.
  5. We take our first big step thoward programs that interact with the outside world, a necessary property of data collection programs as we look at files and file input/output.