input: Write a function to generate and print the Fibonacci series up to n numbers where n is provided by the user. The function should handle invalid inputs gracefully and return a message indicating the issue.
  
  def fibonacci_series(n):
      if not isinstance(n, int) or n <= 0:
          return "Invalid input. Please enter a positive integer."
      
      a, b = 0, 1
      result = [a, b]
      
      for _ in range(2, n):
          c = a + b
          a, b = b, c
          result.append(c)
      
      return ' '.join(map(str, result))
  
  assert fibonacci_series(10) == '0 1 1 2 3 5 8 13 21 34'
  assert fibonacci_series(1) == '0 1'
  assert fibonacci_series(-5) == "Invalid input. Please enter a positive integer."
  assert fibonacci_series(0) == "Invalid input. Please enter a positive integer."
  assert fibonacci_series("abc") == "Invalid input. Please enter a positive integer."
output: def fibonacci_series(n):
      if not isinstance(n, int) or n <= 0:
          return "Invalid input. Please enter a positive integer."
      
      a, b = 0, 1
      result = [a, b]
      
      for _ in range(2, n):
          c = a + b
          a, b = b, c
          result.append(c)
      
      return ' '.join(map(str, result))