This loop prints the way I need to:
Code:
while abs(b**2-a)>e and steps<10000.:
steps=steps+1
b=(b+a/b)/2
currenttotal=currenttotal+b
written=currenttotal
print>>squarerootfile, written
print steps
Code:
while abs(b**2-a)>e and steps<10000.:
Leave a comment: