Here is the program written in class on Friday . Important issues to look for in Chapter 4 Not made very explicit in the book is the fact functions are the one and only language feature that lets you break down a project into manageable pieces. The definition contains the actual code for the function, meaning that's where you program what the function does. If you are mathematically inclined you should see the analogy with mathematical functions. Libraries are collections of functions, either written by you or, better yet, written by someone else.
Classes combine functions with the data they operate on.