/**
 * This function takes a list of names and a desired length of names. It filters out the names that are not of the desired length using a for loop and the '!=' operator.
 *
 * @param names a list of names (String)
 * @param length the desired length of names (Int)
 * @return filteredNames a list of names with the desired length (String)
 */
fun filterNamesByLength(names: List<String>, length: Int): List<String> {

    val filteredNames = mutableListOf<String>()
    
    // Iterate over each name in the names list
    for (name in names) {
        // Check if the length of the name is NOT equal to the desired length
        if (name.length != length) {
            // Append the name to the filteredNames list
            filteredNames.add(name)
        }
    }
    
    return filteredNames
}
/**
 * This function takes a list of names and a desired length of names. It filters out the names that are not of the desired length using a for loop and the '!=' operator.
 *
 * @param names a list of names (String)
 * @param length the desired length of names (Int)
 * @return filteredNames a list of names with the desired length (String)
 */
fun filterNamesByLength(names: List<String>, length: Int): List<String> {
/**
 * This function takes a list of names and a desired length of names. It filters out the names that are not of the desired length using a for loop and the '!=' operator.
 *
 * @param names a list of names (String)
 * @param length the desired length of names (Int)
 * @return filteredNames a list of names with the desired length (String)
 */
fun filterNamesByLength(names: List<String>, length: Int): List<String> {

    val filteredNames = mutableListOf<String>()
    
    // Iterate over each name in the names list
    for (name in names) {
        // Check if the length of the name is NOT equal to the desired length
        if (name.length != length) {
            // Append the name to the filteredNames list
            filteredNames.add(name)
        }
    }
    
    return filteredNames
}