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