/**
 * This function calculates the total weight of the animals that are heavier than a given threshold.
 *
 * @param animals A list of animals and their respective weights.
 * @param weightThreshold The weight threshold used to filter the animals.
 * @return The total weight of the animals that are heavier than the given threshold.
 */
fun calculateAnimalWeight(animals: List<Pair<String, Int>>, weightThreshold: Int): Int {

    // Initialize the total weight variable with zero
    var totalWeight = 0

    // Iterate through each animal and weight in the list
    for ((_, weight) in animals) {
        // Check if the weight is above the threshold
        if (weight > weightThreshold) {
            // Add the weight to the total
            totalWeight += weight
        }
    }

    // Return the total weight
    return totalWeight
}
/**
 * This function calculates the total weight of the animals that are heavier than a given threshold.
 *
 * @param animals A list of animals and their respective weights.
 * @param weightThreshold The weight threshold used to filter the animals.
 * @return The total weight of the animals that are heavier than the given threshold.
 */
fun calculateAnimalWeight(animals: List<Pair<String, Int>>, weightThreshold: Int): Int {
/**
 * This function calculates the total weight of the animals that are heavier than a given threshold.
 *
 * @param animals A list of animals and their respective weights.
 * @param weightThreshold The weight threshold used to filter the animals.
 * @return The total weight of the animals that are heavier than the given threshold.
 */
fun calculateAnimalWeight(animals: List<Pair<String, Int>>, weightThreshold: Int): Int {

    // Initialize the total weight variable with zero
    var totalWeight = 0

    // Iterate through each animal and weight in the list
    for ((_, weight) in animals) {
        // Check if the weight is above the threshold
        if (weight > weightThreshold) {
            // Add the weight to the total
            totalWeight += weight
        }
    }

    // Return the total weight
    return totalWeight
}