i need to write a script that get input from client of an number and i need to print back the PI number until client number for example: client number is 52 --> 3.14159265358979323846264338327950288419716939937510
so far i write this:
sum = 0
for i in range(1, 1001):
sum += ((-1)**(i+1))*4 / ((i + i)*(i + i + 1)*(i + i + 2))
print(sum)
the issue is that python showing to me only the 17 decimals digits, and i expect to see the 1000 decimal digits. there is a way to showing all the decimal digits based on the inputed range? it's for school task, so i need to write is as simple as it can be.