Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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|

image text in transcribedimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions