x=2 for i in range(100): xnew = x – (x*2 – 2)/(2x) if abs(xnew – x) < 0.001: break x = xnew print(“the poot is %.100f at %d iterations.” % […]
x=2 for i in range(100): xnew = x – (x*2 – 2)/(2x) if abs(xnew – x) < 0.001: break x = xnew print(“the poot is %.100f at %d iterations.” % […]