input: Write a python function to solve quadratic equations and return the roots.
  assert quadratic_eq(1, -5, 6) == (3.0, 2.0)
  assert quadratic_eq(1, -2, 1) == (1.0,)
  assert quadratic_eq(1, 0, 1) == (1j, -1j)
output: def quadratic_eq(a, b, c):
      import cmath
      d = b**2 - 4*a*c
      if d > 0:
          root1 = (-b + cmath.sqrt(d)) / (2 * a)
          root2 = (-b - cmath.sqrt(d)) / (2 * a)
          return (root1.real, root2.real)
      elif d == 0:
          root = -b / (2 * a)
          return (root,)
      else:
          root1 = (-b + cmath.sqrt(d)) / (2 * a)
          root2 = (-b - cmath.sqrt(d)) / (2 * a)
          return (root1, root2)