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

5 lines
146 B
Python
Raw Permalink Normal View History

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