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. If the given number n is less than 0, the function should return "Incorrect input".
  def fibonacci(n):
      if n < 0:
          return "Incorrect input"
      if n == 0:
          return [0]
      if n == 1:
          return [0, 1]
      series = [0, 1]
      while series[-1] + series[-2] <= n:
          series.append(series[-1] + series[-2])
      return series
  
  n = int(input("Enter a number: "))
  print(fibonacci(n))
  
  assert fibonacci(-1) == "Incorrect input"
  assert fibonacci(0) == [0]
  assert fibonacci(1) == [0, 1]
  assert fibonacci(10) == [0, 1, 1, 2, 3, 5, 8]
output: def fibonacci(n):
      if n < 0:
          return "Incorrect input"
      if n == 0:
          return [0]
      if n == 1:
          return [0, 1]
      series = [0, 1]
      while series[-1] + series[-2] <= n:
          series.append(series[-1] + series[-2])
      return series