input: Write a function to print the Fibonacci series up to a given number. The function should take an integer input and print the Fibonacci sequence up to that number. If the input number is less than 0, it should print "Incorrect input".
  def fibonacci(n):
      if n < 0:
          print("Incorrect input")
      else:
          a, b = 0, 1
          while a <= n:
              print(a, end=" ")
              a, b = b, a + b
          print()
  
  # Test cases
  fibonacci(10)
  fibonacci(20)
  fibonacci(-5)
  fibonacci(0)
  
  # Expected Output:
  # 0 1 1 2 3 5 8
  # 0 1 1 2 3 5 8 13 20
  # Incorrect input
  # 0
output: def fibonacci(n):
      if n < 0:
          print("Incorrect input")
      else:
          a, b = 0, 1
          while a <= n:
              print(a, end=" ")
              a, b = b, a + b
          print()