Question: Have to code with python in sympy (a) Use a while loop to create the recursive sequence a1 = 1, an+1 = 7 2 an

Have to code with python in sympy

(a) Use a while loop to create the recursive sequence a1 = 1, an+1 = 7 2 an until |an+1 an|

Have to code with python in sympy (a) Use a while loopto create the recursive sequence a1 = 1, an+1 = 7 2

In [2]:import sympy import math from numpy import* a, n-symbols('a n') array[1, 5] n1 while a[n]-a n-1]>.00001: array.append (7-(2/a[n])) n+-1 Traceback (most recent call last) TypeError kipython-input-2-9f27bbbe90f1> in () ----> 6 a n-1] 2 (2/a[n]) 7 array[1, 5] TypeError: 'Symbol ' bject is not subscriptable 3. (a) Use a while loop to create the recursive sequence al 1, an+1-7-_ until an Ian+1-anl

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!