# Physics 212, 2018: Lab 11

Back to the main Teaching page.

Back to Physics 212, 2018: Computational Modeling.

- Python Guide Chapter 6.2
- Python Guide Chapter 7
- Develop code to calculate in a 1d, 2d, 3d random walks what is the distribution of time it takes for a particle to return back to zero for the first time. In other words, launch a random walk, stop it when the particle is back at zero (and be careful that it may never come back to zero, so account for this in your code), record time to zero. Do it many times and histogram the distribution. Notice the long tail in this distribution. Estimate what is the fraction of particles in different dimensions that never return back to the origin.