/**
 * A function to calculate the pollutant levels based on given threshold values.
 *
 * @param pollutants A dictionary containing pollutant names as keys and pollutant levels as values.
 * @param thresholdValues A dictionary containing pollutant names as keys and their respective threshold values as values.
 * @return A dictionary containing pollutant names as keys and their respective levels compared to the threshold values as values.
 */
fun calculatePollutantLevels(pollutants: Map<String, Int>, thresholdValues: Map<String, Pair<Int, Int>>): Map<String, String> {

    val pollutantStatus = mutableMapOf<String, String>()

    for ((pollutant, level) in pollutants) {
        if (pollutant !in thresholdValues) {
            continue
        } else if (level <= thresholdValues[pollutant]!!.first) {
            pollutantStatus[pollutant] = "Below Threshold"
        } else if (level > thresholdValues[pollutant]!!.first && level <= thresholdValues[pollutant]!!.second) {
            pollutantStatus[pollutant] = "Within Threshold"
        } else {
            pollutantStatus[pollutant] = "Above Threshold"
        }
    }

    return pollutantStatus
}

// Exercise: Complete the code above by filling in the missing parts to calculate the pollutant levels.
// Use the following dictionaries
/**
 * A function to calculate the pollutant levels based on given threshold values.
 *
 * @param pollutants A dictionary containing pollutant names as keys and pollutant levels as values.
 * @param thresholdValues A dictionary containing pollutant names as keys and their respective threshold values as values.
 * @return A dictionary containing pollutant names as keys and their respective levels compared to the threshold values as values.
 */
fun calculatePollutantLevels(pollutants: Map<String, Int>, thresholdValues: Map<String, Pair<Int, Int>>): Map<String, String> {
/**
 * A function to calculate the pollutant levels based on given threshold values.
 *
 * @param pollutants A dictionary containing pollutant names as keys and pollutant levels as values.
 * @param thresholdValues A dictionary containing pollutant names as keys and their respective threshold values as values.
 * @return A dictionary containing pollutant names as keys and their respective levels compared to the threshold values as values.
 */
fun calculatePollutantLevels(pollutants: Map<String, Int>, thresholdValues: Map<String, Pair<Int, Int>>): Map<String, String> {

    val pollutantStatus = mutableMapOf<String, String>()

    for ((pollutant, level) in pollutants) {
        if (pollutant !in thresholdValues) {
            continue
        } else if (level <= thresholdValues[pollutant]!!.first) {
            pollutantStatus[pollutant] = "Below Threshold"
        } else if (level > thresholdValues[pollutant]!!.first && level <= thresholdValues[pollutant]!!.second) {
            pollutantStatus[pollutant] = "Within Threshold"
        } else {
            pollutantStatus[pollutant] = "Above Threshold"
        }
    }

    return pollutantStatus
}

// Exercise: Complete the code above by filling in the missing parts to calculate the pollutant levels.
// Use the following dictionaries