input: Write a function to calculate the minimum and maximum values in an array.
  
  def min_max(array):
      min = array[0]
      max = array[0]
  
      for val in array[1:]:
          if val > max:
              max = val
          if val < min:
              min = val
      return min, max
  
  assert min_max([34, 15, 88, 2]) == (2, 88)
  assert min_max([4, 6, 2, 1, 9, 63, -134, 566]) == (-134, 566)
  assert min_max([1, 1, 1, 1]) == (1, 1)
  assert min_max([-5, -2, -1, -3]) == (-5, -1)
  assert min_max([0]) == (0, 0)
output: def min_max(array):
      min = array[0]
      max = array[0]
  
      for val in array[1:]:
          if val > max:
              max = val
          if val < min:
              min = val
      return min, max