/**
 * This exercise will test your knowledge on creating a tuple using parentheses and finding characters in a string using loops.
 *
 * You are given a list of zoo animals and a character. Your task is to create a tuple using parentheses, that contains the names of all the animals from the list where the given character is present. You should then return the tuple.
 *
 * Example:
 * createTupleWithParentheses(listOf("elephant", "lion", "tiger", "giraffe"), 'e')
 * Output: ('elephant', 'tiger')
 *
 * createTupleWithParentheses(listOf("monkey", "snake", "bird"), 'o')
 * Output: ('monkey')
 */
fun createTupleWithParentheses(zooAnimals: List<String>, character: Char): List<String> {

    val animalNames = mutableListOf<String>()
    for (animal in zooAnimals) {
        if (character in animal) {
            animalNames.add(animal)
        }
    }
    return animalNames
}
/**
 * This exercise will test your knowledge on creating a tuple using parentheses and finding characters in a string using loops.
 *
 * You are given a list of zoo animals and a character. Your task is to create a tuple using parentheses, that contains the names of all the animals from the list where the given character is present. You should then return the tuple.
 *
 * Example:
 * createTupleWithParentheses(listOf("elephant", "lion", "tiger", "giraffe"), 'e')
 * Output: ('elephant', 'tiger')
 *
 * createTupleWithParentheses(listOf("monkey", "snake", "bird"), 'o')
 * Output: ('monkey')
 */
fun createTupleWithParentheses(zooAnimals: List<String>, character: Char): List<String> {
/**
 * This exercise will test your knowledge on creating a tuple using parentheses and finding characters in a string using loops.
 *
 * You are given a list of zoo animals and a character. Your task is to create a tuple using parentheses, that contains the names of all the animals from the list where the given character is present. You should then return the tuple.
 *
 * Example:
 * createTupleWithParentheses(listOf("elephant", "lion", "tiger", "giraffe"), 'e')
 * Output: ('elephant', 'tiger')
 *
 * createTupleWithParentheses(listOf("monkey", "snake", "bird"), 'o')
 * Output: ('monkey')
 */
fun createTupleWithParentheses(zooAnimals: List<String>, character: Char): List<String> {

    val animalNames = mutableListOf<String>()
    for (animal in zooAnimals) {
        if (character in animal) {
            animalNames.add(animal)
        }
    }
    return animalNames
}