input: Write a function to generate the Fibonacci series up to n terms.
  assert fibonacci_series(5)==[0, 1, 1, 2, 3]
  assert fibonacci_series(10)==[0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
  assert fibonacci_series(7)==[0, 1, 1, 2, 3, 5, 8]
output: def fibonacci_series(n):
      if n <= 0:
          return []
      series = [0, 1]
      while len(series) < n:
          series.append(series[-1] + series[-2])
      return series[:n]