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

5 lines
136 B
Python
Raw Normal View History

2024-05-23 14:47:20 +02:00
def approx_pi(var_1):
var_2 = 0
for var_3 in range(var_1+1):
var_2+=4*((-1)**var_3/(2*var_3+1))
return var_2