This code will not run! Fix the for-loop to run over your desired number of terms, and fix the
term= line
to be the formula for each "term" in the sum (the $\frac{1}{16^n}\left(...\right)$ in the formula
above).
Here's another formula to try:
$\pi=\sum\limits_{n=1}^\infty\frac{1}{n^3}\left(\frac{-238}{n+1}+\frac{285/2}{2n+1}-\frac{667/32}{4n+1}-\frac{5103/16}{4n+3}+\frac{35625/32}{4n+5}\right)$
This one was found by Adamchik and Wagon in 1997 (see p. 227 of "Pi Unleashed).