5 lines
140 B
Python
5 lines
140 B
Python
|
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
|