Prologue

These materials were created to support the instruction of engineering students learning programming for the first time. The language throughout is Python. The materials are evolving, but the general organization of the content can be divided into four basic categories: (1) the use of Python and supporting modules as an interactive, graphical calculator; (2) basic programming concepts (e.g., conditionals and loops) and their implementation; (3) more advanced topics like modular programming and unit testing; and (4) applications that include symbolic computation, data analysis (e.g., curve fitting), and numerical solution of differential equations.

Why Python?

Python has long been in many scientists’ “toolboxes,” and it is now the most popular first language in top computer science programs (notably MIT and Carnegie Mellon; see, e.g., this article). Here’s a well-articulated explanation on why Python offers a good alternative to more traditional first languages like C/C++ and Java. I was once a heavy MATLAB user, too, and I still use C++ (and sometimes Fortran, and even less frequently, the MATLAB-like Octave) for scientific applications. However, for 90% or so of the things I do, the reduced time I spend writing code in Python far outweighs any performance lost relative to a compiled language.

Acknowledgements

These materials have been supported, in part, by K-State’s Global Campus and K-State’s Open/Alternative Textbook iniative.

The materials have also benefitted from corrections and suggestions of many students and others, including (TBC)