@@ -0,0 +1,583 @@
+from __future__ import division%0Afrom decimal import Decimal, getcontext%0A%0A#reference: https://www.math.hmc.edu/funfacts/ffiles/20010.5.shtml%0A%0Adigits = int(raw_input(%22Enter how many digits of pi you'd like to go to. Maximum is 1000.%5Cn%22))%0Awhile digits %3C 0 or digits %3E 1000:%0A    print %22That number is too big%22%0A    digits = int(raw_input(%22Enter how many digits of pi you'd like to go to. Maximum is 1000.%5Cn%22))%0A%0Agetcontext().prec = digits%0Api = Decimal(0)%0A%0Afor k in xrange(digits+1):%0A    pi += Decimal((16**(-k))*((4/(8*k+1))-(2/(8*k+4))-(1/(8*k+5))-(1/(8*k+6))))%0A%0Aprint str(pi)%5B:digits+1%5D%0A

Create NthPiPython.py