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

9 lines
150 B
Python
Raw Normal View History

2024-05-23 14:47:20 +02:00
def approx_pi(i):
i = 7
n = 0
pi = 0
if n <= i :
j = ((-1)**n)/((2*n) +1)
pi += 4*j
n+=1
return pi