Question: PYTHON uer the lowing (Cool) tae 72 6 m2 m=1 The summation up to a finite integer n, i.e. Em=1 m2, is called a truncated

PYTHON

PYTHON uer the lowing (Cool) tae 72 6 m2 m=1 The summation

up to a finite integer n, i.e. Em=1 m2, is called a

uer the lowing (Cool) tae 72 6 m2 m=1 The summation up to a finite integer n, i.e. Em=1 m2, is called a truncated series. a) (25 points) Write a program that asks the user to enter an integer n, and computes the truncated series Cm=1 ma Sample input/output: Enter an integer n > 0: 10 The truncated series evaluates to: 1.5497677311665408 Enter an integer n > 0: 100 The truncated series evaluates to: 1.6349839001848923 Any correct solution is worth full grade. Submit your solution in a file called Prob2a.py including your name and ID number. b) (25 points) For every truncated series at some integer n, the difference | - Im=1 mil is called the approximation error. Write a program that asks the user to enter a number e and computes the smallest n such that the truncated series at n has approximation error less than e. Note: 2 To compute the approximation error, you may use the Python value of a by including from math import pi. Sample input/output: Enter a desired approximation error: 0.03 The smallest n is: 33 Enter a desired approximation error: 0.001 The smallest n is: 1000

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!