input: Write a python function to calculate the square root of a number using the Newton-Raphson method.
  assert abs(sqrt(25) - 5) < 0.0001
  assert abs(sqrt(16) - 4) < 0.0001
  assert abs(sqrt(2) - 1.4142) < 0.0001
output: def sqrt(n, tolerance=0.0001):
      guess = n / 2.0
      while abs(guess * guess - n) > tolerance:
          guess = (guess + n / guess) / 2.0
      return guess