OK, this is a very inefficient way of trying to find pi... But at least it found a few digits. If the program stops it is taking over a second to run a loop of code. This is a safety measure that will hopefully stop the program before it begins to lag up your computer to much. By the way if you like this I made a Prime Number Finder Here's the link: https://scratch.mit.edu/projects/420746555/
π = 3.14159... 1 + 1/4 + 1/9 + 1/16 + 1/25 + ... + 1/n^2 = (π^2)/6 This is what I use to calculate π. I found that fact here: https://www.scientificamerican.com/article/what-is-pi-and-how-did-it-originate/#:~:text=In%20decimal%20form%2C%20the%20value,places%2C%20pi%20is%203.141592653589793238.)