input: Write a python function to approximate pi to a given accuracy.
  assert approximate_pi(2) == 3.14
  assert approximate_pi(3) == 3.142
  assert approximate_pi(4) == 3.1416
output: def approximate_pi(accuracy):
      pi = 0
      n = 0
      while True:
          pi += (4 * (-1)**n) / (2*n + 1)
          if round(pi, accuracy) == round(3.141592653589793, accuracy):
              return round(pi, accuracy)
          n += 1