/**
 * The physician wants to calculate the weighted average of scores.
 * Given two lists, scoreList and weightList, the physician wants to
 * compute the weighted average of the scores by multiplying each score
 * with its respective weight and then dividing the sum of their products
 * by the sum of the weights.
 *
 * @param scoreList A list of scores.
 * @param weightList A list of corresponding weights.
 * @return The weighted average of the scores.
 */
fun calculateWeightedAvg(scoreList: List<Double>, weightList: List<Double>): Double {

    var totalScore = 0.0
    var totalWeight = 0.0

    for ((score, weight) in scoreList.zip(weightList)) {
        totalScore += score * weight
        totalWeight += weight
    }

    val weightedAvg = totalScore / totalWeight

    return weightedAvg
}
/**
 * The physician wants to calculate the weighted average of scores.
 * Given two lists, scoreList and weightList, the physician wants to
 * compute the weighted average of the scores by multiplying each score
 * with its respective weight and then dividing the sum of their products
 * by the sum of the weights.
 *
 * @param scoreList A list of scores.
 * @param weightList A list of corresponding weights.
 * @return The weighted average of the scores.
 */
fun calculateWeightedAvg(scoreList: List<Double>, weightList: List<Double>): Double {
/**
 * The physician wants to calculate the weighted average of scores.
 * Given two lists, scoreList and weightList, the physician wants to
 * compute the weighted average of the scores by multiplying each score
 * with its respective weight and then dividing the sum of their products
 * by the sum of the weights.
 *
 * @param scoreList A list of scores.
 * @param weightList A list of corresponding weights.
 * @return The weighted average of the scores.
 */
fun calculateWeightedAvg(scoreList: List<Double>, weightList: List<Double>): Double {

    var totalScore = 0.0
    var totalWeight = 0.0

    for ((score, weight) in scoreList.zip(weightList)) {
        totalScore += score * weight
        totalWeight += weight
    }

    val weightedAvg = totalScore / totalWeight

    return weightedAvg
}