This week's Brain Candy was inspired by this post:
How Mathematicians Used A Pump-Action Shotgun to Estimate Pi
This method of calculating pi is called the Monte Carlo Method or a Monte Carlo simulation. The Brain Candy this week is to use pseudo-random numbers to calculate pi using the Monte Carlo Method. If you need a bit of help with the math the medium post above or Wikipedia can help you out.