Hello!
I have this function:
1 + 1/x^2
I want to get the product of this function from n = 1 to n = 19
(1 + 1/1^2) * (1 + 1/2^2) * (1 + 1/3^2) * (1+1/n^2)....
How can I do this in python in a easy way?
I get the right numbers but i cant figure out how to multiplie all togheter.
Python script so far:
n = 1
while n < 19:
n = n + 1
func = (1 + 1/n**2)
print(func)
I have this function:
1 + 1/x^2
I want to get the product of this function from n = 1 to n = 19
(1 + 1/1^2) * (1 + 1/2^2) * (1 + 1/3^2) * (1+1/n^2)....
How can I do this in python in a easy way?
I get the right numbers but i cant figure out how to multiplie all togheter.
Python script so far:
n = 1
while n < 19:
n = n + 1
func = (1 + 1/n**2)
print(func)