About initial programming in python: Consider the series: 1)" 1 = 1 - 3 1 1 1 2n | 1 7 9 n=0 whose sum converges to n 74 , That is: П lim s, = a) Write a function that, given n, calculates the sum of the series up to term n. b) Write a function that calculates the sum of the series with an error of less than O.01, that is, calculate the sum of the series series such that |Sn-N/4| < O. 01. Your function must also return the number of terms necessary to reach this error, that is, your function will return a tuple with the two calculated values. Important: It is mandatory to use the function defined in the previous item. Hint: math.fabs(number) returns the absolute value (module) of a number.
About initial programming in python: Consider the series: 8. 1)" 1 = 1- 3 1 1 1 2n | 1 n=0 whose sum converges ton/4 That is: П lim s, = a) Write a function that, given n, calculates the sum of the series up to term n. b) Write a function that calculates the sum of the series with an error of less than O.01, that is, calculate the sum of the series series such that |Sn-N/4| < O. 01. Your function must also return the number of terms necessary to reach this error, that is, your function will return a tuple with the two calculated values. Important: It is mandatory to use the function defined in the previous item. Hint: math.fabs(number) returns the absolute value (module) of a number.
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 4 images