Severity: Notice
Message: Trying to access array offset on value of type bool
Filename: view/view.php
Line Number: 33
Severity: Notice
Message: Trying to access array offset on value of type bool
Filename: view/view.php
Line Number: 33
Severity: Notice
Message: Trying to access array offset on value of type bool
Filename: view/view.php
Line Number: 33
a = -1.1 k = 1.4 tol = float(input()) nmax = int(input()) sum_1 = -0.40087 total = 0 error = 1 for i in range (1,nmax+1): total += ((a**i)*(2*i - 1))/(k**(2*i+1)) error = i/total if abs(error)<=tol: break print(total)