Day 15

Today

Next time

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.