input: Write a function to take an array of numbers and return an array with the greatest and smallest values.
  
  def min_max(arr):
      min_val = min(arr)
      max_val = max(arr)
      return [min_val, max_val]
  
  assert min_max([3, 4, 2, 8, 15, 6]) == [2, 15]
  assert min_max([1, 2, 3, 4, 5]) == [1, 5]
  assert min_max([10, -5, 9, 3]) == [-5, 10]
  assert min_max([0, 0, 0, 0]) == [0, 0]
  assert min_max([]) == [None, None]
output: def min_max(arr):
      if not arr:
          return [None, None]
      min_val = min(arr)
      max_val = max(arr)
      return [min_val, max_val]