/**
 * Given a dictionary of exercises and their values, calculate the total progress made by the patient.
 * The dictionary contains exercises as keys and a list of progress values for each exercise as values.
 * The progress values are represented as percentages.
 * The function should return the total progress in percentage.
 *
 * @param exerciseDict A dictionary of exercises and their progress values.
 * @return The total progress made by the patient in percentage.
 *
 * Example:
 * calculatePatientProgress(mapOf("Push-ups" to listOf(50, 70, 90), "Squats" to listOf(40, 60, 80, 100)))
 * Output: 82.5
 */
fun calculatePatientProgress(exerciseDict: Map<String, List<Int>>): Double {

    var totalProgress = 0.0
    val numExercises = exerciseDict.size

    for ((_, progressList) in exerciseDict) {
        val exerciseProgress = progressList.sum().toDouble() / progressList.size
        totalProgress += exerciseProgress
    }

    return totalProgress / numExercises
}
/**
 * Given a dictionary of exercises and their values, calculate the total progress made by the patient.
 * The dictionary contains exercises as keys and a list of progress values for each exercise as values.
 * The progress values are represented as percentages.
 * The function should return the total progress in percentage.
 *
 * @param exerciseDict A dictionary of exercises and their progress values.
 * @return The total progress made by the patient in percentage.
 *
 * Example:
 * calculatePatientProgress(mapOf("Push-ups" to listOf(50, 70, 90), "Squats" to listOf(40, 60, 80, 100)))
 * Output: 82.5
 */
fun calculatePatientProgress(exerciseDict: Map<String, List<Int>>): Double {
/**
 * Given a dictionary of exercises and their values, calculate the total progress made by the patient.
 * The dictionary contains exercises as keys and a list of progress values for each exercise as values.
 * The progress values are represented as percentages.
 * The function should return the total progress in percentage.
 *
 * @param exerciseDict A dictionary of exercises and their progress values.
 * @return The total progress made by the patient in percentage.
 *
 * Example:
 * calculatePatientProgress(mapOf("Push-ups" to listOf(50, 70, 90), "Squats" to listOf(40, 60, 80, 100)))
 * Output: 82.5
 */
fun calculatePatientProgress(exerciseDict: Map<String, List<Int>>): Double {

    var totalProgress = 0.0
    val numExercises = exerciseDict.size

    for ((_, progressList) in exerciseDict) {
        val exerciseProgress = progressList.sum().toDouble() / progressList.size
        totalProgress += exerciseProgress
    }

    return totalProgress / numExercises
}