Skip to main content

Foundations of Python Programming: Functions First

Section 1 Foreword to the Functions First Edition

By Charlotte Curtis
This "Functions First" edition is an adaptation of the original Foundations of Python Programming book that places an emphasis on learning to program, not learning to program in Python. This book was created for Mount Royal University’s introductory programming course, where students learn Python first and then follow up with C++ or Java depending on their major. The following changes were made:
  • As suggested by the name, functions were moved much earlier in the book and are introduced as the major programming construct. We have observed that functions are one of the most challenging concept for beginners, so the early introduction provides the opportunity to practice this concept throughout the course.
  • Most turtle graphics examples were removed to keep the focus on terminal programs.
  • Python-specific data structures and patterns like dictionaries, list comprehension, tuple packing and unpacking were removed to maintain a focus on the core programming concepts.
  • Iteration was rearranged to introduce while before for loops in order to emphasize the initialization, condition, update pattern.
  • Several chapters such as sorting, testing, and inheritance were removed to keep the content consistent with a single semester course.
The majority of the adaptation was done by Matthew Hrehirchuk, with supervision and edits by Eric Chalmers, Charlotte Curtis, and Patrick Perri. Support for this adaptation was provided by Mount Royal University Library’s OER adaptation grant 1  program.
At the time of writing in June 2023, this book is still a work in progress. If you spot any errors or confusing text, please don’t hesitate to submit an issue to our issue tracker. 2