input: Write a function that takes an array of numbers and returns 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]
output: def min_max(arr):
    min_val = min(arr)
    max_val = max(arr)
    return [min_val, max_val]