input: Write a function to print the Fibonacci series up to a given number n. If the input number is less than 0, print "Incorrect input". The function should return the nth Fibonacci number if n is greater than or equal to 0.
  def fibonacci_series(n): 
      if n < 0: 
          print("Incorrect input") 
          return
      a, b = 0, 1
      if n == 0: 
          print(a)
      elif n == 1: 
          print(a, b)
      else: 
          print(a, b, end=" ")
          for i in range(2, n + 1): 
              c = a + b 
              a = b 
              b = c 
              print(b, end=" ")
  
  n = int(input("Enter a number: "))
  fibonacci_series(n)
  
  assert fibonacci_series(0) == None
  assert fibonacci_series(1) == None
  assert fibonacci_series(5) == None
  assert fibonacci_series(-1) == None
output: def fibonacci_series(n): 
      if n < 0: 
          print("Incorrect input") 
          return
      a, b = 0, 1
      if n == 0: 
          print(a)
      elif n == 1: 
          print(a, b)
      else: 
          print(a, b, end=" ")
          for i in range(2, n + 1): 
              c = a + b 
              a = b 
              b = c 
              print(b, end=" ")