/**
 * Given a list of tuples containing information about different shapes (such as shape type, dimensions, and color),
 * write a function that filters out the tuples that have the specified color.
 *
 * @param tuples A list of tuples representing different shapes.
 * @param color The color to filter the tuples by.
 * @return A filtered list of tuples with the specified color.
 */
fun filterTuplesByColor(tuples: List<Triple<String, String, String>>, color: String): List<Triple<String, String, String>> {

    val filteredTuples = mutableListOf<Triple<String, String, String>>()

    for (shape in tuples) {
        // Check if the current tuple's color matches the specified color
        if (shape.third == color) {
            filteredTuples.add(shape)
        }
    }

    return filteredTuples
}
/**
 * Given a list of tuples containing information about different shapes (such as shape type, dimensions, and color),
 * write a function that filters out the tuples that have the specified color.
 *
 * @param tuples A list of tuples representing different shapes.
 * @param color The color to filter the tuples by.
 * @return A filtered list of tuples with the specified color.
 */
fun filterTuplesByColor(tuples: List<Triple<String, String, String>>, color: String): List<Triple<String, String, String>> {
/**
 * Given a list of tuples containing information about different shapes (such as shape type, dimensions, and color),
 * write a function that filters out the tuples that have the specified color.
 *
 * @param tuples A list of tuples representing different shapes.
 * @param color The color to filter the tuples by.
 * @return A filtered list of tuples with the specified color.
 */
fun filterTuplesByColor(tuples: List<Triple<String, String, String>>, color: String): List<Triple<String, String, String>> {

    val filteredTuples = mutableListOf<Triple<String, String, String>>()

    for (shape in tuples) {
        // Check if the current tuple's color matches the specified color
        if (shape.third == color) {
            filteredTuples.add(shape)
        }
    }

    return filteredTuples
}