/**
 * This exercise focuses on using if-else statements and modifying map items.
 *
 * You are an anthropologist studying different tribes in a remote area. The tribe names are stored as keys in a map,
 * and the number of settlers for each tribe is stored as the corresponding value. Your task is to modify the number
 * of settlers based on certain conditions and return the updated map.
 *
 * @param settlers A map representing the tribes and their number of settlers.
 * @return The updated map with modified number of settlers for each tribe.
 */
fun findTribe(settlers: Map<String, Int>): Map<String, Int> {

    // Check if the 'settlers' map is empty
    if (settlers.isEmpty()) {
        return settlers
    }

    // Create a mutable map to store the updated number of settlers
    val updatedSettlers = settlers.toMutableMap()

    // Iterate over the tribes and modify the number of settlers based on certain conditions
    for ((tribe, numSettlers) in updatedSettlers) {
        // Check if the number of settlers is less than 10
        if (numSettlers < 10) {
            updatedSettlers[tribe] = numSettlers / 2
        }
        // Check if the number of settlers is between 10 and 100
        else if (numSettlers in 10..100) {
            // Add your condition here
        }
    }

    return updatedSettlers
}
/**
 * This exercise focuses on using if-else statements and modifying map items.
 *
 * You are an anthropologist studying different tribes in a remote area. The tribe names are stored as keys in a map,
 * and the number of settlers for each tribe is stored as the corresponding value. Your task is to modify the number
 * of settlers based on certain conditions and return the updated map.
 *
 * @param settlers A map representing the tribes and their number of settlers.
 * @return The updated map with modified number of settlers for each tribe.
 */
fun findTribe(settlers: Map<String, Int>): Map<String, Int> {
/**
 * This exercise focuses on using if-else statements and modifying map items.
 *
 * You are an anthropologist studying different tribes in a remote area. The tribe names are stored as keys in a map,
 * and the number of settlers for each tribe is stored as the corresponding value. Your task is to modify the number
 * of settlers based on certain conditions and return the updated map.
 *
 * @param settlers A map representing the tribes and their number of settlers.
 * @return The updated map with modified number of settlers for each tribe.
 */
fun findTribe(settlers: Map<String, Int>): Map<String, Int> {

    // Check if the 'settlers' map is empty
    if (settlers.isEmpty()) {
        return settlers
    }

    // Create a mutable map to store the updated number of settlers
    val updatedSettlers = settlers.toMutableMap()

    // Iterate over the tribes and modify the number of settlers based on certain conditions
    for ((tribe, numSettlers) in updatedSettlers) {
        // Check if the number of settlers is less than 10
        if (numSettlers < 10) {
            updatedSettlers[tribe] = numSettlers / 2
        }
        // Check if the number of settlers is between 10 and 100
        else if (numSettlers in 10..100) {
            // Add your condition here
        }
    }

    return updatedSettlers
}