
C H A P T E R 2
Simple Python Programs
2.1 INTRODUCTION
This chapter presents an overview of the structure of a computer program,
which include data definitions and basic instructions using the Python pro-
gramming la nguage. Because functions are one of the building blocks and
the fundamental components of Python programs, the concepts of function
definitions and function invocations are gradually explained, and complete
Python programs are introduced that illustrate further the role of functions.
This chapter also presents concepts and principles that are us e d in develop-
ing computational models by implementing two mathematical models with
Python