input: Write a function that takes an array of numbers and returns an array with the greatest and smallest values. If the input array is empty, the function should return [None, None].
  
  def find_min_max(arr):
    if not arr:
      return [None, None]
    min_val = min(arr)
    max_val = max(arr)
    return [min_val, max_val]
  
  assert find_min_max([3, 4, 2, 8, 15, 6])==[2, 15]
  assert find_min_max([-1, -2, -3, -4, -5])==[-5, -1]
  assert find_min_max([0, 0, 0, 0])==[0, 0]
  assert find_min_max([])==[None, None]
output: def find_min_max(arr):
    if not arr:
      return [None, None]
    min_val = min(arr)
    max_val = max(arr)
    return [min_val, max_val]