# sum to infinity fuctions with arrays in python help?

Watch
Announcements
#1
The pic linked below shows the function i need to code. can someone start me off in terms of the process, like what do i need to do after defining the function?
also I'm very new to python
Last edited by localmemelord; 1 month ago
0
1 month ago
#2
(Original post by localmemelord)
The pic linked below shows the function i need to code. can someone start me off in terms of the process, like what do i need to do after defining the function?
also I'm very new to python
I can help if you put the problem in words for me
0
1 month ago
#3
(Original post by localmemelord)
The pic linked below shows the function i need to code. can someone start me off in terms of the process, like what do i need to do after defining the function?
also I'm very new to python
How much Python have you covered? I'm not an expert, but you're going to need the sine function so I'm not sure whether that's in native Python or whether you have to import a maths library, should be fairly simple in either case. And then your (truncated) sum is basically a big for loop - but note that it's only summing over odd values of n, so be careful how you set up the for loop. All the rest is just multiplying and adding (using a running total for the sum), plus a reference to pi (again, not sure if that's a predefined constant in Python).
0
1 month ago
#4
(Original post by davros)
How much Python have you covered? I'm not an expert, but you're going to need the sine function so I'm not sure whether that's in native Python or whether you have to import a maths library, should be fairly simple in either case. And then your (truncated) sum is basically a big for loop - but note that it's only summing over odd values of n, so be careful how you set up the for loop. All the rest is just multiplying and adding (using a running total for the sum), plus a reference to pi (again, not sure if that's a predefined constant in Python).
no ik how to do it in python, i just need you to break the math problem into steps
0
1 month ago
#5
oh and im good with python
0
1 month ago
#6
no ik how to do it in python, i just need you to break the math problem into steps
I'm not the OP - I was replying to the OP to see if some hints on Python would help them code it
0
1 month ago
#7
ah right
well:
python has no Pi
not sur about sine, though i think it does
0
X

new posts
Back
to top
Latest
My Feed

### Oops, nobody has postedin the last few hours.

Why not re-start the conversation?

see more

### See more of what you like onThe Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

### Poll

Join the discussion

#### Have you experienced financial difficulties as a student due to Covid-19?

Yes, I have really struggled financially (14)
12.07%
I have experienced some financial difficulties (28)
24.14%
I haven't experienced any financial difficulties and things have stayed the same (50)
43.1%
I have had better financial opportunities as a result of the pandemic (20)
17.24%
3.45%