Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PYTHON: I started to write this code but I dont understand if I'm supposed to be computing for pi/4 or just pi. My code works
PYTHON:
I started to write this code but I dont understand if I'm supposed to be computing for pi/4 or just pi. My code works for pi.
#inputs the nubmer of terms terms=int(input("Enter number of terms of pi to evaluate:")) #Set counter to 0 seriesSum=0 #Iterates each term for i in range(0,terms): #Adds terms to the series seriesSum +=( pow(-1, i) * ( 1 / ( (pow(((2*i)+3), 3)) - ((2*i)+3) ) ) ); print(4*((3/4)+seriesSum));
Can anyone check my code and confirm this is correct?
Write a well-documented Python program nilakanthapy to implement the Nilakantha series for computing . The Nilakantha series is: -=-+ 4 4 . (2n+3)-(2n+3) The program should accept N, the number of terms in the series. Submit a screen capture of the IDLE depicting your solution for when N-927Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started