/**
 * Given a dictionary containing the number of parts for each instrument,
 * calculate the total number of instrumental parts needed for a musician.
 *
 * @param instrumentsDict A dictionary where the keys are the names of the instruments
 *                        and the values are the number of parts needed for each instrument.
 * @return The total number of instrumental parts needed.
 *
 * Examples:
 * calculateTotalInstrumentalParts(mapOf("Piano" to 2, "Guitar" to 3, "Drums" to 1)) // 6
 * calculateTotalInstrumentalParts(mapOf("Trumpet" to 1, "Saxophone" to 2, "Violin" to 4, "Cello" to 3)) // 10
 */
fun calculateTotalInstrumentalParts(instrumentsDict: Map<String, Int>): Int {

    var totalParts = 0

    for ((_, numParts) in instrumentsDict) {
        totalParts += numParts
    }

    return totalParts
}
/**
 * Given a dictionary containing the number of parts for each instrument,
 * calculate the total number of instrumental parts needed for a musician.
 *
 * @param instrumentsDict A dictionary where the keys are the names of the instruments
 *                        and the values are the number of parts needed for each instrument.
 * @return The total number of instrumental parts needed.
 *
 * Examples:
 * calculateTotalInstrumentalParts(mapOf("Piano" to 2, "Guitar" to 3, "Drums" to 1)) // 6
 * calculateTotalInstrumentalParts(mapOf("Trumpet" to 1, "Saxophone" to 2, "Violin" to 4, "Cello" to 3)) // 10
 */
fun calculateTotalInstrumentalParts(instrumentsDict: Map<String, Int>): Int {
/**
 * Given a dictionary containing the number of parts for each instrument,
 * calculate the total number of instrumental parts needed for a musician.
 *
 * @param instrumentsDict A dictionary where the keys are the names of the instruments
 *                        and the values are the number of parts needed for each instrument.
 * @return The total number of instrumental parts needed.
 *
 * Examples:
 * calculateTotalInstrumentalParts(mapOf("Piano" to 2, "Guitar" to 3, "Drums" to 1)) // 6
 * calculateTotalInstrumentalParts(mapOf("Trumpet" to 1, "Saxophone" to 2, "Violin" to 4, "Cello" to 3)) // 10
 */
fun calculateTotalInstrumentalParts(instrumentsDict: Map<String, Int>): Int {

    var totalParts = 0

    for ((_, numParts) in instrumentsDict) {
        totalParts += numParts
    }

    return totalParts
}