input: 
  def print_fibonacci_series(n): 
      """
      Print the Fibonacci series up to a given number.
      >>> print_fibonacci_series(5)
      0 1 1 2 3
      >>> print_fibonacci_series(10)
      0 1 1 2 3 5 8
      """
      a = 0
      b = 1
      if n < 0: 
          print("Incorrect input") 
      else: 
          print(a, end=" ")
          for _ in range(2, n+1): 
              print(b, end=" ")
              c = a + b 
              a = b 
              b = c 
          print()
  
  # Example usage:
  n = int(input("Enter a number: "))
  print_fibonacci_series(n)
  
output:     a = 0
      b = 1
      if n < 0: 
          print("Incorrect input") 
      else: 
          print(a, end=" ")
          while b <= n:
              print(b, end=" ")
              c = a + b 
              a = b 
              b = c 
          print()