Prerequisite: familiarity with Python variables, functions, dictionaries, lists, conditionals, and exceptions. No prior class design is assumed. Run each Python block independently with Python 3.
A calculation may need only inputs and a function. A long-lived record has another concern: its current values must remain connected to the rules that use them. These lessons move from the smaller choice to a class, then trace what names and attributes actually refer to.
- Start with a calculation
- Notice what must be remembered
- Name a kind of record
- Follow names and references
- Decide where an attribute belongs
Continue to Keeping state consistent.