Finish this in PY
I have part of code of this question plz help me to finish the rest.
for i in range(100):
xnew = x – (x**2 – 2)/(2*x)
if abs(xnew – x) < 0.001: break
x = xnew
print(“the poot is %.100f at %d iterations.” % (xnew, i))