Page 1 of 1

Question 2: (3 marks) The value of a can be calculated using the infinite series: 4 = 4-5+5779 4 4 + 3 Write a function

Posted: Wed Apr 27, 2022 3:09 pm
by answerhappygod
Question 2 3 Marks The Value Of A Can Be Calculated Using The Infinite Series 4 4 5 5779 4 4 3 Write A Function 1
Question 2 3 Marks The Value Of A Can Be Calculated Using The Infinite Series 4 4 5 5779 4 4 3 Write A Function 1 (20.28 KiB) Viewed 33 times
Question 2: (3 marks) The value of a can be calculated using the infinite series: 4 = 4-5+5779 4 4 + 3 Write a function float pi(int terms) that takes the precision as the number of series terms and return the estimated value of x based on those terms. Example: pi(1) should return 4 : only one term is used: 4. pi(2) should return 2.66; two terms where used: 4 - <insert your program here> <insert a screenshot of the output here when calling pi(1), pi(2), pi(10), pi(50), pi(100), pi(1000), pi(10000)>