Day 15
Today
- Inheritance review
- Drawing Classes: UML diagrams
Next time
- No Reading Journal assigned. If you’d like something to read, check out Think Python Chapter 19: “The Goodies”. This chapter has lots of fun and useful material for you to explore on your own.
- Continue work on MP4 and Project Toolboxes
Drawing classes: shapes
In the Reading Journal you practiced refactoring a set of classes using inheritance. Let’s draw a class diagram illustrating which shape classes inherit from which.
Inheritance practice: counters, multisets, and Bayesian statistics
If you’d like more practice or to see inheritance in another context, we have also posted a notebook that walks you through using inheritance to go from the built-in Python collection Counter
all the way up to Bayesian statistics.
If you’re interested in learning more about this topic, you should check out Think Bayes or Allen’s “Computational Bayesian Statistics” course.
As a side note, in order to easily access these notebooks, you might want to clone the website repository. All the notebooks are in the notebooks
directory of the repository.