input: Write a function to calculate the average of a list of positive integers and output the result. If the list is empty, return 0.
  
  def calculate_average(list_of_positive_integers):
      if not list_of_positive_integers:
          return 0
      total = sum(list_of_positive_integers)
      avg = total / len(list_of_positive_integers)
      return avg
  
  assert calculate_average([1, 5, 6, 7, 8]) == 5.4
  assert calculate_average([5, 10, 15]) == 10.0
  assert calculate_average([1]) == 1.0
  assert calculate_average([]) == 0
output: def calculate_average(list_of_positive_integers):
      if not list_of_positive_integers:
          return 0
      total = sum(list_of_positive_integers)
      avg = total / len(list_of_positive_integers)
      return avg