/**
 * Given an artist, title, and list of genres, this function returns true if the artist matches
 * and the title contains either the word "painting" or "sculpture", otherwise it returns false.
 *
 * @param artist the name of the artist
 * @param title the title of the artwork
 * @param genres a list of genres associated with the artwork
 * @return true if the artist matches and the title contains either "painting" or "sculpture", otherwise false
 */
fun filterArtwork(artist: String, title: String, genres: List<String>): Boolean {

    var artistMatch = false
    var genreMatch = false

    for (genre in genres) {
        if (genre.equals("painting", ignoreCase = true) || genre.equals("sculpture", ignoreCase = true)) {
            genreMatch = true
            break
        }
    }

    if (artist.equals("artist name", ignoreCase = true) && (title.contains("painting", ignoreCase = true) || title.contains("sculpture", ignoreCase = true))) {
        artistMatch = true
    }

    return artistMatch && genreMatch
}
/**
 * Given an artist, title, and list of genres, this function returns true if the artist matches
 * and the title contains either the word "painting" or "sculpture", otherwise it returns false.
 *
 * @param artist the name of the artist
 * @param title the title of the artwork
 * @param genres a list of genres associated with the artwork
 * @return true if the artist matches and the title contains either "painting" or "sculpture", otherwise false
 */
fun filterArtwork(artist: String, title: String, genres: List<String>): Boolean {
/**
 * Given an artist, title, and list of genres, this function returns true if the artist matches
 * and the title contains either the word "painting" or "sculpture", otherwise it returns false.
 *
 * @param artist the name of the artist
 * @param title the title of the artwork
 * @param genres a list of genres associated with the artwork
 * @return true if the artist matches and the title contains either "painting" or "sculpture", otherwise false
 */
fun filterArtwork(artist: String, title: String, genres: List<String>): Boolean {

    var artistMatch = false
    var genreMatch = false

    for (genre in genres) {
        if (genre.equals("painting", ignoreCase = true) || genre.equals("sculpture", ignoreCase = true)) {
            genreMatch = true
            break
        }
    }

    if (artist.equals("artist name", ignoreCase = true) && (title.contains("painting", ignoreCase = true) || title.contains("sculpture", ignoreCase = true))) {
        artistMatch = true
    }

    return artistMatch && genreMatch
}