Answer the question
In order to leave comments, you need to log in
How to write it in a loop?
I can't figure out how to write the code
Answer the question
In order to leave comments, you need to log in
import math
a_n_prev = x
for i in range(2, n):
a_n = 3 + 1/(2**n) * math.pow(math.sin(a_n_prev - x), 2) #a_n_prev = a_n-1
print(a_n)
a_n_prev = a_n
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question