input: Write a function to print Fibonacci series up to a given number. The function should return the Fibonacci number at the given index or print an error message if the input is incorrect.
  def fibonacci(n): 
      if n < 0: 
          return "Incorrect input"
      a, b = 0, 1
      for _ in range(n):
          print(a, end=" ")
          a, b = b, a + b
      print()
      
  n = int(input("Enter a number: "))
  fibonacci(n)
  
  assert fibonacci(5) == None
  assert fibonacci(-1) == "Incorrect input"
  assert fibonacci(0) == None
output: def fibonacci(n): 
      if n < 0: 
          return "Incorrect input"
      a, b = 0, 1
      for _ in range(n):
          print(a, end=" ")
          a, b = b, a + b
      print()