/**
 * Given the number of children and their behavior scores, this function evaluates whether the
 * behavior of each child is within an acceptable range or not. It then prints a message for each child,
 * indicating whether they need intervention or not.
 *
 * @param numChildren An integer representing the number of children.
 * @param behaviorScores A list of integers representing the behavior scores of each child.
 */
fun socialWorkerInterventions(numChildren: Int, behaviorScores: List<Int>) {

    if (numChildren < 1) {
        // No children, no intervention necessary
        println("No intervention necessary.")
        return
    }

    for (index in 0 until numChildren) {
        when {
            behaviorScores[index] < 7 -> println("Child ${index + 1} needs immediate intervention.")
            behaviorScores[index] in 7..9 -> println("Child ${index + 1} behavior score is acceptable.")
            else -> println("Child ${index + 1} has an invalid behavior score.")
        }
    }
}
/**
 * Given the number of children and their behavior scores, this function evaluates whether the
 * behavior of each child is within an acceptable range or not. It then prints a message for each child,
 * indicating whether they need intervention or not.
 *
 * @param numChildren An integer representing the number of children.
 * @param behaviorScores A list of integers representing the behavior scores of each child.
 */
fun socialWorkerInterventions(numChildren: Int, behaviorScores: List<Int>) {
/**
 * Given the number of children and their behavior scores, this function evaluates whether the
 * behavior of each child is within an acceptable range or not. It then prints a message for each child,
 * indicating whether they need intervention or not.
 *
 * @param numChildren An integer representing the number of children.
 * @param behaviorScores A list of integers representing the behavior scores of each child.
 */
fun socialWorkerInterventions(numChildren: Int, behaviorScores: List<Int>) {

    if (numChildren < 1) {
        // No children, no intervention necessary
        println("No intervention necessary.")
        return
    }

    for (index in 0 until numChildren) {
        when {
            behaviorScores[index] < 7 -> println("Child ${index + 1} needs immediate intervention.")
            behaviorScores[index] in 7..9 -> println("Child ${index + 1} behavior score is acceptable.")
            else -> println("Child ${index + 1} has an invalid behavior score.")
        }
    }
}