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

7 lines
160 B
Python
Raw Normal View History

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