9 lines
188 B
Python
9 lines
188 B
Python
|
i = 0
|
||
|
s = 0.0
|
||
|
while s <= 1.644934:
|
||
|
i = i + 1
|
||
|
s = s + 1.0 / (i * i)
|
||
|
print("Schritt: " + str(i) + ", Wert: " + str(s))
|
||
|
|
||
|
|
||
|
#pi^2/6 = 1,644934, wird erreicht nach 14959887 Schritten
|