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
I am trying to do a little bit of numeric computing. I wrote a program that writes the result of each iteration of a function to a file. I want to graph these results as dots using vpython, but I am unable to do so.
I need each value to be on its own line in the text file, so I am using this to write the value to the text file:
Leave a comment: