input: Write a function to calculate the maximum, minimum, and average values from a given sequence of numbers.
  def calculate_metrics(list):
      maximum = max(list)
      minimum = min(list)
      n = len(list)
      total = 0
      for num in list:
          total += num
      average = total/n
      return maximum, minimum, average
  assert calculate_metrics([3, 4, 5, 6, 21, 8]) == (21, 3, 8.166666666666666)
  assert calculate_metrics([10, 15, 20]) == (20, 10, 15.0)
  assert calculate_metrics([0, 0, 0]) == (0, 0, 0.0)
  assert calculate_metrics([-5, -10, -2]) == (-2, -10, -5.666666666666667)
output: def calculate_metrics(list):
      maximum = max(list)
      minimum = min(list)
      n = len(list)
      total = 0
      for num in list:
          total += num
      average = total/n
      return maximum, minimum, average