linfo2335-programming-parad.../project-3/regex/code/code613.py

6 lines
125 B
Python
Raw Permalink Normal View History

2024-05-23 14:47:20 +02:00
def approx_pi(i):
sum=0
for x in range (0,i+1):
sum+=((-1)**i)/((2*i)+1)
sum=4*sum
print(sum)