input: Write a function to generate Fibonacci series up to n terms.
  assert generate_fibonacci(0) == [0]
  assert generate_fibonacci(1) == [1]
  assert generate_fibonacci(5) == [0, 1, 1, 2, 3]
  assert generate_fibonacci(7) == [0, 1, 1, 2, 3, 5, 8]
output: def generate_fibonacci(n):
      if n == 0:
          return [0]
      elif n == 1:
          return [1]
      fib_series = [0, 1]
      for i in range(2, n):
          fib_series.append(fib_series[-1] + fib_series[-2])
      return fib_series