input: Write a function to generate the nth Fibonacci number. The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones, usually starting with 0 and 1. The function should return the nth Fibonacci number. If the input is less than 0, it should print "Incorrect input". If the input is 0 or 1, it should return 0 or 1, respectively. For other inputs, it should compute the Fibonacci number accordingly.
  def fibonacci(n):
      a = 0
      b = 1
      if n < 0:
          print("Incorrect input")
      elif n == 0:
          return a
      elif n == 1:
          return b
      else:
          for i in range(2, n+1):
              c = a + b
              a = b
              b = c
          return b
  
  # Test cases
  assert fibonacci(-1) == None  # Should print "Incorrect input"
  assert fibonacci(0) == 0
  assert fibonacci(1) == 1
  assert fibonacci(2) == 1
  assert fibonacci(9) == 34
output: def fibonacci(n):
      a = 0
      b = 1
      if n < 0:
          print("Incorrect input")
      elif n == 0:
          return a
      elif n == 1:
          return b
      else:
          for i in range(2, n+1):
              c = a + b
              a = b
              b = c
          return b