/**
 * A psychologist is conducting a study and needs to update the scores of participants.
 *
 * Each participant has a unique ID as the key in the dictionary, and their score as the value.
 * The psychologist needs to update the scores of a specific group of participants by adding 10 to their current score.
 *
 * Your task is to loop through the dictionary of participant scores and modify the scores
 * of participants whose ID ends with the letter 'y' or 'z' by adding 10 to their current score.
 *
 * @param participantScores A dictionary representing participant IDs and their scores.
 * @return The updated dictionary of participant scores after modifying the scores.
 */
fun updateScores(participantScores: MutableMap<String, Int>): MutableMap<String, Int> {

    for ((participantId, score) in participantScores) {
        if (participantId.takeLast(1) == "y" || participantId.takeLast(1) == "z") {
            participantScores[participantId] = score + 10
        }
    }
    return participantScores
}
/**
 * A psychologist is conducting a study and needs to update the scores of participants.
 *
 * Each participant has a unique ID as the key in the dictionary, and their score as the value.
 * The psychologist needs to update the scores of a specific group of participants by adding 10 to their current score.
 *
 * Your task is to loop through the dictionary of participant scores and modify the scores
 * of participants whose ID ends with the letter 'y' or 'z' by adding 10 to their current score.
 *
 * @param participantScores A dictionary representing participant IDs and their scores.
 * @return The updated dictionary of participant scores after modifying the scores.
 */
fun updateScores(participantScores: MutableMap<String, Int>): MutableMap<String, Int> {
/**
 * A psychologist is conducting a study and needs to update the scores of participants.
 *
 * Each participant has a unique ID as the key in the dictionary, and their score as the value.
 * The psychologist needs to update the scores of a specific group of participants by adding 10 to their current score.
 *
 * Your task is to loop through the dictionary of participant scores and modify the scores
 * of participants whose ID ends with the letter 'y' or 'z' by adding 10 to their current score.
 *
 * @param participantScores A dictionary representing participant IDs and their scores.
 * @return The updated dictionary of participant scores after modifying the scores.
 */
fun updateScores(participantScores: MutableMap<String, Int>): MutableMap<String, Int> {

    for ((participantId, score) in participantScores) {
        if (participantId.takeLast(1) == "y" || participantId.takeLast(1) == "z") {
            participantScores[participantId] = score + 10
        }
    }
    return participantScores
}