5 lines
136 B
Python
5 lines
136 B
Python
|
def approx_pi(var_1):
|
||
|
var_2 = 0
|
||
|
for var_3 in range(var_1+1):
|
||
|
var_2+=4*((-1)**var_1/(2*var_1+1))
|
||
|
return var_2
|