Python programming

Why is Python so great in Physics?

- It helps your understanding of systems and physical phenomena through modeling.

Differential equations such as: oscillations of simple systems (spring-mass, pendulum, etc.), fluid mechanics (Navier-Stokes, Laplace's, etc.),

quantum mechanics (Schrödinger’s) and many others are used to model simple or complicated phenomena.

By using Python, we’ll show you how to numerically solve these equations.

- It gives you independence and self-reliance in analyzing any kind of experimental data.

Python reads like a real programming language, unlike many others.

Python is interpreted, which can save you considerable time during program development because compiling and linking are unnecessary.

Python also has a command-line interpreter so you can try out Python language features and perform quick computations.

Python programs can be developed much more rapidly than C programs, are more concise, and are easier to read.

The language is named after “Monty Python’s Flying Circus” and has nothing to do with reptiles, in spite of the well known scipy logo.

References

1) Python in Physics on-line tutorials that can be found at : http://compwiki.physics.utoronto.ca/ Developed at Department of Physics, U of T.

Install Python on your home computer (follow the installation instructions from compwiki). We use version 2.7.3

Read: Tutorial Parts 1-4: "Numerical Integration" and "Physics with Pylab" until Sept. 15.

Try all tutorial exercises.

At the end of this self-study, you'll get a vague idea about Python programming, but by doing a series of guided 5 computational exercises until the end of October, you'll be at the top of it!

2) Computational Physics with Python (open online textbook) http://www-personal.umich.edu/~mejn/computational-physics/ Excellent online resource written by Mark Newmann.

Read Chapters 2, 3, 4, 5.

Also read Appendix B: Differences between Python versions.