Codes for the Marathon Program of the Python Book