/**
 * This exercise requires the user to create a tuple using the tuple() function and demonstrate their understanding of loop control statements.
 *
 * The user will be asked to provide a list of legal case names. They will have to use a loop to iterate through the list, check if a case name contains a certain keyword, and if it does, add it to the tuple. Finally, the user will have to print the resulting tuple.
 *
 * The keyword for this exercise is 'lawsuit'.
 */
fun createTupleLawyer() {

    // Ask the user to input a list of legal case names
    print("Enter a list of legal case names, separated by commas: ")
    val caseNames = readLine()?.split(",") ?: emptyList()

    // Initialize an empty list
    val caseTuples = mutableListOf<String>()

    // Iterate through each case name in the list
    for (caseName in caseNames) {
        // Check if the case name contains the keyword 'lawsuit'
        if (caseName.contains("lawsuit", ignoreCase = true)) {
            // Convert the case name to uppercase and add it to the list
            caseTuples.add(caseName.toUpperCase())
        }
    }

    // Print the resulting list
    println("The following cases contain the keyword 'lawsuit' and are stored as a list: $caseTuples")
}
/**
 * This exercise requires the user to create a tuple using the tuple() function and demonstrate their understanding of loop control statements.
 *
 * The user will be asked to provide a list of legal case names. They will have to use a loop to iterate through the list, check if a case name contains a certain keyword, and if it does, add it to the tuple. Finally, the user will have to print the resulting tuple.
 *
 * The keyword for this exercise is 'lawsuit'.
 */
fun createTupleLawyer() {
/**
 * This exercise requires the user to create a tuple using the tuple() function and demonstrate their understanding of loop control statements.
 *
 * The user will be asked to provide a list of legal case names. They will have to use a loop to iterate through the list, check if a case name contains a certain keyword, and if it does, add it to the tuple. Finally, the user will have to print the resulting tuple.
 *
 * The keyword for this exercise is 'lawsuit'.
 */
fun createTupleLawyer() {

    // Ask the user to input a list of legal case names
    print("Enter a list of legal case names, separated by commas: ")
    val caseNames = readLine()?.split(",") ?: emptyList()

    // Initialize an empty list
    val caseTuples = mutableListOf<String>()

    // Iterate through each case name in the list
    for (caseName in caseNames) {
        // Check if the case name contains the keyword 'lawsuit'
        if (caseName.contains("lawsuit", ignoreCase = true)) {
            // Convert the case name to uppercase and add it to the list
            caseTuples.add(caseName.toUpperCase())
        }
    }

    // Print the resulting list
    println("The following cases contain the keyword 'lawsuit' and are stored as a list: $caseTuples")
}