5 lines
96 B
Python
5 lines
96 B
Python
|
n = int(input("Enter n:"))
|
||
|
s = 0.0
|
||
|
for i in range (1, n + 1):
|
||
|
s = s + 1.0 / (i * i)
|
||
|
print(s)
|