input: Write a function to print the Fibonacci series up to a given number n. The function should return the Fibonacci series as a list of numbers.
  
  assert fibonacci(0)==[0]
  assert fibonacci(1)==[0, 1]
  assert fibonacci(10)==[0, 1, 1, 2, 3, 5, 8]
  assert fibonacci(20)==[0, 1, 1, 2, 3, 5, 8, 13]
  assert fibonacci(30)==[0, 1, 1, 2, 3, 5, 8, 13, 21]
output: def fibonacci(n):
      if n == 0:
          return [0]
      elif n == 1:
          return [0, 1]
      else:
          fib_series = [0, 1]
          while True:
              next_fib = fib_series[-1] + fib_series[-2]
              if next_fib > n:
                  break
              fib_series.append(next_fib)
          return fib_series