/**
 * You are a psychologist analyzing patients' mood data stored in a dictionary.
 * The dictionary contains emotional scores ranging from positive to negative integers.
 * Your task is to access the negative values in the dictionary and return the sum of all the negative scores.
 *
 * @param dictionary A dictionary containing emotional scores.
 * @return The sum of all negative scores in the dictionary.
 */
fun getNegativeValue(dictionary: Map<String, Int>): Int {

    // Initialize a variable to hold the sum of negative scores
    var negativeSum = 0

    // Iterate over each key-value pair in the dictionary
    for ((_, value) in dictionary) {
        // Check if the value is a negative integer
        if (value < 0) {
            // Update the negative sum by adding the negative value
            negativeSum += value
        }
    }

    return negativeSum
}
/**
 * You are a psychologist analyzing patients' mood data stored in a dictionary.
 * The dictionary contains emotional scores ranging from positive to negative integers.
 * Your task is to access the negative values in the dictionary and return the sum of all the negative scores.
 *
 * @param dictionary A dictionary containing emotional scores.
 * @return The sum of all negative scores in the dictionary.
 */
fun getNegativeValue(dictionary: Map<String, Int>): Int {
/**
 * You are a psychologist analyzing patients' mood data stored in a dictionary.
 * The dictionary contains emotional scores ranging from positive to negative integers.
 * Your task is to access the negative values in the dictionary and return the sum of all the negative scores.
 *
 * @param dictionary A dictionary containing emotional scores.
 * @return The sum of all negative scores in the dictionary.
 */
fun getNegativeValue(dictionary: Map<String, Int>): Int {

    // Initialize a variable to hold the sum of negative scores
    var negativeSum = 0

    // Iterate over each key-value pair in the dictionary
    for ((_, value) in dictionary) {
        // Check if the value is a negative integer
        if (value < 0) {
            // Update the negative sum by adding the negative value
            negativeSum += value
        }
    }

    return negativeSum
}