input: Write a function to print the Fibonacci series up to a given number n. If n is less than 0, print "Incorrect input". If n is 0, print 0. If n is positive, print the Fibonacci series up to the n-th number.
  
  def fibonacci(n):
      a = 0
      b = 1
      result = []
      if n < 0:
          print("Incorrect input")
      elif n == 0:
          result.append(a)
      elif n == 1:
          result.append(a)
          result.append(b)
      else:
          result.append(a)
          result.append(b)
          for i in range(2, n + 1):
              c = a + b
              result.append(c)
              a = b
              b = c
      return result
  
  assert fibonacci(0) == [0]
  assert fibonacci(1) == [0, 1]
  assert fibonacci(5) == [0, 1, 1, 2, 3, 5]
  assert fibonacci(-1) == "Incorrect input"
  assert fibonacci(10) == [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
output: def fibonacci(n):
      if n < 0:
          print("Incorrect input")
      elif n == 0:
          print(0)
      else:
          a, b = 0, 1
          print(a)
          if n > 0:
              print(b)
          for _ in range(2, n + 1):
              c = a + b
              print(c)
              a, b = b, c