/**
 * Calculate the average weight of all the pets in the dictionary.
 *
 * @param petsDict A dictionary where the keys are the pet names and the values are their weights (in grams).
 * @return The average weight of all the pets in the dictionary.
 */
fun calculateAverageWeight(petsDict: Map<String, Int>): Double {

    // Calculate the sum of all weights
    var totalWeight = 0
    for (weight in petsDict.values) {
        totalWeight += weight
    }

    // Calculate the average weight
    val averageWeight = totalWeight.toDouble() / petsDict.size

    return averageWeight
}
/**
 * Calculate the average weight of all the pets in the dictionary.
 *
 * @param petsDict A dictionary where the keys are the pet names and the values are their weights (in grams).
 * @return The average weight of all the pets in the dictionary.
 */
fun calculateAverageWeight(petsDict: Map<String, Int>): Double {
/**
 * Calculate the average weight of all the pets in the dictionary.
 *
 * @param petsDict A dictionary where the keys are the pet names and the values are their weights (in grams).
 * @return The average weight of all the pets in the dictionary.
 */
fun calculateAverageWeight(petsDict: Map<String, Int>): Double {

    // Calculate the sum of all weights
    var totalWeight = 0
    for (weight in petsDict.values) {
        totalWeight += weight
    }

    // Calculate the average weight
    val averageWeight = totalWeight.toDouble() / petsDict.size

    return averageWeight
}