def approx_pi(var_1):
sum=0
for var_2 in range (0,var_1+1):
sum+=((-1)**var_1)/((2*var_1)+1)
sum=4*sum
return sum