def Heron(a,x,n): for i in range(n): x=(x+a/x)/2 return x