input: Write a function to generate and 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 greater than 1, print the series up to 'n'.
  def fibonacci_series(n):
      if n < 0:
          print("Incorrect input")
          return
      a, b = 0, 1
      print(a, end=" ")
      if n > 0:
          print(b, end=" ")
      for _ in range(2, n + 1):
          a, b = b, a + b
          print(b, end=" ")
      
  n = int(input("Enter a number: "))
  fibonacci_series(n)
  
  assert fibonacci_series(-1) == None
  assert fibonacci_series(0) == None
  assert fibonacci_series(1) == None
  assert fibonacci_series(5) == None
  assert fibonacci_series(7) == None
output: def fibonacci_series(n):
      if n < 0:
          print("Incorrect input")
          return
      a, b = 0, 1
      print(a, end=" ")
      if n > 0:
          print(b, end=" ")
      for _ in range(2, n + 1):
          a, b = b, a + b
          print(b, end=" ")