The output of this program is a table, but it is kind of messy. How to align the different columns? Thanks
Code:
import math
for a in range(1, 10):
x = 3.0
while True:
y = (x + a/x) / 2
if y == x:
break
x = y
sq = math.sqrt(a)
print float(a), sq, x, abs(sq - x)