/**
 * This function takes a list of strings and a threshold value.
 * It returns a new list with strings that have a length greater than the threshold,
 * formatted in a specific way.
 *
 * @param stringList List of strings.
 * @param threshold Threshold value.
 * @return List of formatted strings with length greater than the threshold.
 *
 * Example:
 * formatStringGreaterThanThreshold(listOf("apple", "banana", "orange"), 5) // ["APPLE", "ORANGE"]
 * formatStringGreaterThanThreshold(listOf("hello", "world", "python"), 4) // ["HELLO", "PYTHON"]
 */
fun formatStringGreaterThanThreshold(stringList: List<String>, threshold: Int): List<String> {

    val result = mutableListOf<String>()
    for (string in stringList) {
        if (string.length > threshold) {
            val formattedString = string.toUpperCase()
            result.add(formattedString)
        }
    }
    return result
}
/**
 * This function takes a list of strings and a threshold value.
 * It returns a new list with strings that have a length greater than the threshold,
 * formatted in a specific way.
 *
 * @param stringList List of strings.
 * @param threshold Threshold value.
 * @return List of formatted strings with length greater than the threshold.
 *
 * Example:
 * formatStringGreaterThanThreshold(listOf("apple", "banana", "orange"), 5) // ["APPLE", "ORANGE"]
 * formatStringGreaterThanThreshold(listOf("hello", "world", "python"), 4) // ["HELLO", "PYTHON"]
 */
fun formatStringGreaterThanThreshold(stringList: List<String>, threshold: Int): List<String> {
/**
 * This function takes a list of strings and a threshold value.
 * It returns a new list with strings that have a length greater than the threshold,
 * formatted in a specific way.
 *
 * @param stringList List of strings.
 * @param threshold Threshold value.
 * @return List of formatted strings with length greater than the threshold.
 *
 * Example:
 * formatStringGreaterThanThreshold(listOf("apple", "banana", "orange"), 5) // ["APPLE", "ORANGE"]
 * formatStringGreaterThanThreshold(listOf("hello", "world", "python"), 4) // ["HELLO", "PYTHON"]
 */
fun formatStringGreaterThanThreshold(stringList: List<String>, threshold: Int): List<String> {

    val result = mutableListOf<String>()
    for (string in stringList) {
        if (string.length > threshold) {
            val formattedString = string.toUpperCase()
            result.add(formattedString)
        }
    }
    return result
}