subject

The mathematical constant Pi is an irrational number with value approximately 3.1415928... The precise value of this constant can be obtained from the following infinite sum: Pi^2 = 8+8/3^2+8/5^2+8/7^2+8/9^2+...
(Pi is of course just the square root of this value.)
Although we cannot compute the entire infinite series, we get a good approximation of the value of Pi' by computing the beginning of such a sum. Write a function approxPIsquared that takes as input float error and approximates constant Pi to within error by computing the above sum, term by term, until the difference between the new and the previous sum is less than error. The function should return the new sum
>>>approxPIsquared(0.0001)
9.855519952254232
>>>approxPIsquared(0.00000 001)
9.869462988376474

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:30
Research data that is presented using descriptive language is said to be
Answers: 2
question
Computers and Technology, 23.06.2019 04:31
Selling a product through an electronic medium is
Answers: 1
question
Computers and Technology, 23.06.2019 18:30
List 3 items that were on kens resume that should have been excluded
Answers: 1
question
Computers and Technology, 24.06.2019 14:30
Two students are discussing electricity that has a frequency of 60 hz. student a says that this type of electricity is referred to as ac. student b says that in this type of electricity, the electrons flow in only one direction. which of the following statements is correct? a. only student a is correct b. only student b is correct c. both of the two students are correct d. neither of the two students is correct
Answers: 1
You know the right answer?
The mathematical constant Pi is an irrational number with value approximately 3.1415928... The preci...
Questions
question
Mathematics, 10.05.2021 22:30
question
Mathematics, 10.05.2021 22:30
question
Mathematics, 10.05.2021 22:30
Questions on the website: 13722366