Here are four programming activities using Snap (or Scratch) related to pi. Good pi-day activities, though if students independently work on these programs, they may take a few hours to build.
1. Assess the randomness of the first 10,000 digits of pi. Use chi-squared test to assess the randomness of the digits. Also, look for short patterns.
2. Estimate pi by computing the ratio of circumferences to diameters as drawn by a program.
3. Estimate pi using a Monte Carlo method: ratio of randomly generated points inside a circle to the points in a circumscribed square.
4. Buffon's Needle.
Discussions detail the development of the programs - little-to-no programming experience required (need to be able to follow Snap or Scratch documentation on how to log in and interact with their interface).
Works best with computers or chromebooks, not iPads.
For activity 1, if chi-squared testing is too advanced for your class, you can plot the results (bar graphs are probably best) and base conclusions on the plots.
Snap, Scratch, computer programming
pi, randomness, chi-squared
testing if a point is inside/outside a circle