a way of estimating pi I found online and had to program cool people use Turbowarp: turbowarp.org/1240046954/ Scratch sometimes does weird things when handling fine numbers but it seems to work okay for this.
x = rand(-1, 1) y = rand(-1, 1) if ((x, y) outside of circle with radius 1) { samplesOutsideCircle++ } else { samplesInsideCircle++ } pi = (samplesInsideCircle / (samplesInsideCircle + samplesOutsideCircle)) * 4