Answered step by step
Verified Expert Solution
Link Copied!

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:image text in transcribed

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-927

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions