Quick appetizer and first tutorial on scientific computing with Python using examples from basic physics.
- Part I introduces the fundamental Python syntax for variables, loops, if-tests, arrays, plotting, files, and classes, using a simple physics formula as example.
- Part II is a real physics application involving analysis of mechanical vibrations. Besides showing how typical scientific Matlab-style scripts look in Python, this example also introduces more advanced concepts like flexible storage of objects in lists and files, downloading data from web sites, user input via the command line, unit testing, symbolic mathematics, and modules.
The goal of the tutorials is to bring the reader quickly up to speed with how Matlab-style programming (with functions of one variable) can be done in Python. With such basic background, it is easier to follow scientific courses and teaching material that apply Python as programming language. The tutorials are application-driven and brief. For further and more detailed information on scientific computing with Python we have compiled a list of much more detailed tutorials and books.