Opening the book…
Now that we know how to create new types, the next step is to write functions that take programmer-defined objects as parameters and return them as results. In this chapter I also present “functional programming style” and two new program development plans.
Code examples from this chapter are available from http://thinkpython2.com/code/Time1.py. Solutions to the exercises are at http://thinkpython2.com/code/Time1_soln.py.
This page titled 16: Classes and functions was last modified on Tue, 01 Dec 2020 03:30:43 GMT and is shared under a CC BY-NC 3.0 license and was authored, remixed, and/or curated by Allen B. Downey (Green Tea Press) via source content that was edited to the style and standards of the LibreTexts platform.
The book could not be loaded just now.