input: Write a function to print the Fibonacci series up to a given number. The function should return None if the input is less than 0, otherwise it should print the Fibonacci sequence up to the given number.
  def fibonacci(n):
      if n < 0:
          print("Incorrect input")
          return None
      if n == 0:
          print(0)
          return None
      a, b = 0, 1
      print(a, b, end=" ")
      for _ in range(2, n + 1):
          c = a + b
          print(c, end=" ")
          a, b = b, c
      print()
  
  n = int(input("Enter a number: "))
  fibonacci(n)
  assert fibonacci(5) == None
  assert fibonacci(10) == None
  assert fibonacci(-1) == None
  assert fibonacci(0) == None
output: def fibonacci(n):
      if n < 0:
          print("Incorrect input")
          return None
      if n == 0:
          print(0)
          return None
      a, b = 0, 1
      print(a, b, end=" ")
      for _ in range(2, n + 1):
          c = a + b
          print(c, end=" ")
          a, b = b, c
      print()