Hi,

(1) In the solutions for FDS week 3 - Exercise 2 - (5) the function compute_sum_epsilon() calls the function

compute_ratio() internally. But as the question asks for computation of F(x, N’) and F(x, N’-1) isn’t the function which has to be internally called is compute_sum() ?

Pasting the solutions code as given in the FDSW3Asgn1Prob2_Solution-200215-182944.ipynb file as below -

def compute_sum_epsilon(x, epsilon):

sum = 1

var = epsilon

i = 1

while var >= epsilon:

var = compute_ratio(x, i)

sum += var

i += 1

return sum

(2) Solution for Exercise-2 Question 6 has to be modified to print v1-v2 and not v2-v1 as asked in the question

p = -1.5

q = 7.1

v1 = compute_sum(p, 100) * compute_sum(q, 100)

v2 = compute_sum(p + q, 100)

print(v1, v2, v2 - v1)

Please clarify

Thanks,

Priya Rajan