This open access book offers an initial introduction to programming for scientific and computational applications using the Python programming language. The presentation style is compact and example-based, making it suitable for students and researchers with little or no prior experience in programming.
The book uses relevant examples from mathematics and the natural sciences to present programming as a practical toolbox that can quickly enable readers to write their own programs for data processing and mathematical modeling. These tools include file reading, plotting, simple text analysis, and using NumPy for numerical computations, which are fundamental building blocks of all programs in data science and computational science. At the same time, readers are introduced to the fundamental concepts of programming, including variables, functions, loops, classes, and object-oriented programming. Accordingly, the book provides a sound basis for further computer science and programming studies.
Joakim Sundnes is Chief Research Scientist at Simula Research Laboratory and teaches undergraduate programming at the University of Oslo. His research is in scientific computing and computational science, mostly focused on biomechanics and computational physiology, and involves extensive programming in Python and other languages. For the last five years he has been responsible for the main introductory programming class for natural science students at the University of Oslo, and he has also taught multiple graduate courses in computational physiology and applied mathematics.
Getting started with Python.- Computing with formulas.- Loops and lists.- Functions and branching.- User input and error handling.- Arrays and plotting.- Dictionaries and strings.- Classes.- Object-oriented programming.