Python Forum
Multiplicate several numbers
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiplicate several numbers
#1
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)
Reply


Messages In This Thread
Multiplicate several numbers - by Student0 - Oct-04-2018, 09:13 PM
RE: Multiplicate several numbers - by nilamo - Oct-04-2018, 09:34 PM
RE: Multiplicate several numbers - by Student0 - Oct-05-2018, 08:40 AM
RE: Multiplicate several numbers - by gruntfutuk - Oct-05-2018, 09:41 AM
RE: Multiplicate several numbers - by nilamo - Oct-09-2018, 05:35 PM
RE: Multiplicate several numbers - by buran - Oct-05-2018, 08:56 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Print Numbers starting at 1 vertically with separator for output numbers Pleiades 3 3,859 May-09-2019, 12:19 PM
Last Post: Pleiades

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020