input: Write a function to print all the divisors of a given number. The function should take an integer as input and return a list of all the divisors of the number. The function should handle invalid input and raise a ValueError if the input is not a positive integer.
  
  
  def print_divisors(num):
      if not isinstance(num, int) or num <= 0:
          raise ValueError("Input must be a positive integer.")
      
      divisors = [i for i in range(1, num + 1) if num % i == 0]
      return divisors
  
  
  ### Test cases:
  assert print_divisors(12) == [1, 2, 3, 4, 6, 12]
  assert print_divisors(25) == [1, 5, 25]
  assert print_divisors(1) == [1]
  assert print_divisors(0) == ValueError
  assert print_divisors(-5) == ValueError
output: def print_divisors(num):
      if not isinstance(num, int) or num <= 0:
          raise ValueError("Input must be a positive integer.")
      
      divisors = [i for i in range(1, num + 1) if num % i == 0]
      return divisors