The aim of this book is to teach computer programming using examples from math-
ematics and the natural sciences. We have chosen to use the Python programming

language because it combines remarkable expressive power with very clean, simple,
and compact syntax. Python is easy to learn and very well suited for an introduction
to computer programming. Python is also quite similar to MATLAB and a good
language for doing mathematical computing. It is easy to combine Python with
compiled languages, like Fortran, C, and C++, which are widely used languages for
scientific computations.

The examples in this book integrate programming with applications to mathe-
matics, physics, biology, and finance. The reader is expected to have knowledge

of basic one-variable calculus as taught in mathematics-intensive programs in high
schools. It is certainly an advantage to take a university calculus course in parallel,
preferably containing both classical and numerical aspects of calculus. Although

not strictly required, a background in high school physics makes many of the ex-
amples more meaningful.