Named for Monte Carlo's famous games of chance, Monte Carlo methods use repeated "random" events to find numeric answers. See https://en.wikipedia.org/wiki/Monte_Carlo_method Here we place dots randomly in a square that encloses a circle. Then we use the relationship between the areas of the circle and square to estimate Pi (i.e., π = 4*(area of the circle)/(area of the square)). See "Notes and Credits" for an Easter Egg hint. ;)
Opening music from PacMan: https://www.classicgaming.cc/classics/pac-man/sounds "Wait," you may ask, "why is that here?" All I can say is, "wait for it." However, if you're inpatient, turning on turbo mode (i.e., shift + green flag), with the sound off, might help. Of course, then you'll want to turn the sound on again at some point. ;)