sum to infinity fuctions with arrays in python help?

Watch
localmemelord
Badges: 15
Rep:
?
#1
Report Thread starter 1 month ago
#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
Attached files
Last edited by localmemelord; 1 month ago
0
reply
SHADOW_SCRIPT
Badges: 9
Rep:
?
#2
Report 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
reply
davros
  • Study Helper
Badges: 16
Rep:
?
#3
Report 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
reply
SHADOW_SCRIPT
Badges: 9
Rep:
?
#4
Report 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
reply
SHADOW_SCRIPT
Badges: 9
Rep:
?
#5
Report 1 month ago
#5
oh and im good with python
0
reply
davros
  • Study Helper
Badges: 16
Rep:
?
#6
Report 1 month ago
#6
(Original post by SHADOW_SCRIPT)
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
reply
SHADOW_SCRIPT
Badges: 9
Rep:
?
#7
Report 1 month ago
#7
ah right
well:
python has no Pi
not sur about sine, though i think it does
btw good advice
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

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

Personalise

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%
I've had another experience (let us know in the thread!) (4)
3.45%

Watched Threads

View All
Latest
My Feed