Додати до Chrome
✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
def fixed_point_iteration():
x = 1.0
for i in range(2): # (1)
x = (x + 3)**0.5 # (2)
return x # (3)
(2) the formula for g(x) is incorrect.
(3) the function returns x1 instead of x2.
(1) the loop runs only once due to range(2).
There is no error; the code is correct.
The loop should use while instead of for.
Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!