a = 9 guess = 1 for i in range(20): guess = float(guess) - (guess**2-a)/(2*guess) print(guess)