Exercises

0.0Make sure your set-up is ok
X.1Use Python to do some serious calculations
2.1Become familiar with electronic Python documentation
2.2Extend Exercise 2.1 with a loop
2.3Find five errors in a script
2.4Basic use of control structures
2.5Use standard input/output instead of files
3.15Annotate a filename with the current date
X.2Use Fortran to do some serious calculations
X.3Use Fortran to do some more serious calculations
5.1Implement a numerical integration rule in F77
5.2Implement a numerical integration rule in C
6.1Modify the Scientific Hello World GUI
6.2Change the layout of the GUI in Exercise 6.1
4.1Matrix-vector multiply with NumPy arrays
4.2Work with slicing and matrix multiplication
X.4Compare two formulas in a plot
X.5Plot a wave packet
X.6Animate a wave packet
X.7Judge a plot
X.11Implement a very simple class
8.26Implement a class for vectors in 3D
8.27Extend the class from Exericse 8.26
4.4Vectorize a constant function
X.8Solve a linear system
2.9Estimate the chance of an event in a dice game
4.8Implement Exercise 2.9 using NumPy arrays
2.10Determine if you win or loose a hazard game
9.1Extend Exercise 5.1 with a callback to Python
10.2Investigate the efficiency of various DAXPY implementations
X.9:Python-Fortran extension of Exercise 10.2

The exercise numbers refer to the numbers used in the book Python Scripting for Computational Science, by H. P. Langtangen. Exercise numbers of the form X.y, where y is an integer, are extra exercises not found in the book.