/**
 * This exercise focuses on tuple unpacking and nested loops for a Physical Therapist.
 *
 * Given a list of patients, each represented as a tuple containing their name and a list of exercises,
 * write a function that prints the name of each patient along with their exercises in the following format:
 *
 * Patient: [patient_name]
 *
 * Exercises:
 * - [exercise_1]
 * - [exercise_2]
 * ...
 *
 * @param patients A list of tuples where each tuple contains the name of a patient as a string
 *                 and their exercises as a list of strings.
 *
 * Example:
 * patients = [('John', ['Stretching', 'Squats']), ('Amy', ['Push-ups', 'Plank'])]
 * unpackAndLoop(patients)
 *
 * Output:
 * Patient: John
 * Exercises:
 * - Stretching
 * - Squats
 *
 * Patient: Amy
 * Exercises:
 * - Push-ups
 * - Plank
 */
fun unpackAndLoop(patients: List<Pair<String, List<String>>>) {

    for ((patient, exercises) in patients) {
        println("Patient: $patient\n")
        println("Exercises:")
        for (exercise in exercises) {
            println("- $exercise")
        }
    }
}
/**
 * This exercise focuses on tuple unpacking and nested loops for a Physical Therapist.
 *
 * Given a list of patients, each represented as a tuple containing their name and a list of exercises,
 * write a function that prints the name of each patient along with their exercises in the following format:
 *
 * Patient: [patient_name]
 *
 * Exercises:
 * - [exercise_1]
 * - [exercise_2]
 * ...
 *
 * @param patients A list of tuples where each tuple contains the name of a patient as a string
 *                 and their exercises as a list of strings.
 *
 * Example:
 * patients = [('John', ['Stretching', 'Squats']), ('Amy', ['Push-ups', 'Plank'])]
 * unpackAndLoop(patients)
 *
 * Output:
 * Patient: John
 * Exercises:
 * - Stretching
 * - Squats
 *
 * Patient: Amy
 * Exercises:
 * - Push-ups
 * - Plank
 */
fun unpackAndLoop(patients: List<Pair<String, List<String>>>) {
/**
 * This exercise focuses on tuple unpacking and nested loops for a Physical Therapist.
 *
 * Given a list of patients, each represented as a tuple containing their name and a list of exercises,
 * write a function that prints the name of each patient along with their exercises in the following format:
 *
 * Patient: [patient_name]
 *
 * Exercises:
 * - [exercise_1]
 * - [exercise_2]
 * ...
 *
 * @param patients A list of tuples where each tuple contains the name of a patient as a string
 *                 and their exercises as a list of strings.
 *
 * Example:
 * patients = [('John', ['Stretching', 'Squats']), ('Amy', ['Push-ups', 'Plank'])]
 * unpackAndLoop(patients)
 *
 * Output:
 * Patient: John
 * Exercises:
 * - Stretching
 * - Squats
 *
 * Patient: Amy
 * Exercises:
 * - Push-ups
 * - Plank
 */
fun unpackAndLoop(patients: List<Pair<String, List<String>>>) {

    for ((patient, exercises) in patients) {
        println("Patient: $patient\n")
        println("Exercises:")
        for (exercise in exercises) {
            println("- $exercise")
        }
    }
}