/**
 * This function takes two lists of equal length as input: 'items' and 'values'.
 * It creates a dictionary by pairing each item from 'items' with its value from 'values',
 * only if the value is greater than or equal to the average of all values.
 *
 * @param items A list of items (strings or integers).
 * @param values A list of values (integers).
 * @return A dictionary where each item from 'items' is mapped to its corresponding value from 'values',
 * only if the value is greater than or equal to the average of all values.
 */
fun createDictionaryOfGreaterThanEqual(items: List<Any>, values: List<Int>): Map<Any, Int> {

    val average = values.sum() / values.size
    val dictionary = mutableMapOf<Any, Int>()

    // Iterate over the items and values simultaneously
    for ((index, item) in items.withIndex()) {
        val value = values[index]
        if (value >= average) {
            dictionary[item] = value
        }
    }

    return dictionary
}
/**
 * This function takes two lists of equal length as input: 'items' and 'values'.
 * It creates a dictionary by pairing each item from 'items' with its value from 'values',
 * only if the value is greater than or equal to the average of all values.
 *
 * @param items A list of items (strings or integers).
 * @param values A list of values (integers).
 * @return A dictionary where each item from 'items' is mapped to its corresponding value from 'values',
 * only if the value is greater than or equal to the average of all values.
 */
fun createDictionaryOfGreaterThanEqual(items: List<Any>, values: List<Int>): Map<Any, Int> {
/**
 * This function takes two lists of equal length as input: 'items' and 'values'.
 * It creates a dictionary by pairing each item from 'items' with its value from 'values',
 * only if the value is greater than or equal to the average of all values.
 *
 * @param items A list of items (strings or integers).
 * @param values A list of values (integers).
 * @return A dictionary where each item from 'items' is mapped to its corresponding value from 'values',
 * only if the value is greater than or equal to the average of all values.
 */
fun createDictionaryOfGreaterThanEqual(items: List<Any>, values: List<Int>): Map<Any, Int> {

    val average = values.sum() / values.size
    val dictionary = mutableMapOf<Any, Int>()

    // Iterate over the items and values simultaneously
    for ((index, item) in items.withIndex()) {
        val value = values[index]
        if (value >= average) {
            dictionary[item] = value
        }
    }

    return dictionary
}