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.
How does a program connect to other programs?
How do we read a program and recgnize its structure?
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.
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.
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.
Contents