A first numerical problem: Radioactive decays

← Previous

Construction of a working Python program: Code

This is the homework exercise. You will be given a skeleton code with the task to expand it correspondingly. The skeleton code consists of three files, The tricky issues are mainly concerned with the concept of a class, and with the creation and handling of such objects. The students are advised to take a closer look at the relevant chapters of the Python online manual or of the following tutorial.
A number of issues related to programming are worth stressing:

The results of the program for dt=0.1 are shown in the figure below.

Results of program with dt=0.1
The error scales linearly with dt, as can be seen from running with varying time step sizes dt, 5*dt and dt/10.

Next →





Frank Krauss and Daniel Maitre
Last modified: Tue Oct 3 14:43:58 BST 2017