Question: *****PYTHON PROGRAM: 5. Write a program to approximate the value of n as the sum 4/1 - 4/3 + 4/5 - 4/7 + 4/9 -
*****PYTHON PROGRAM:

5. Write a program to approximate the value of n as the sum 4/1 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11 + ... Ask the user how many terms to sum. You can change the sign of a number by multiplying it by-1. [3.15] After you print the result, print the difference between the result and math.pi. Call your program 'pi.py". Example usage: This program approximates the value of Pi as 4 - 4/3 + 4/5 - 4/7 + ... Number of terms to sum: 10 Pi approximated: 3.0418396189294032 Error: -0.09975303466038987
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
