/**
 * This function takes an actor's name and a list of movies and returns the movies in which the actor appeared.
 *
 * @param actor The name of the actor/actress.
 * @param movies A list of movies.
 * @return A list of movies in which the actor appeared.
 */
fun findActorMovies(actor: String, movies: List<String>): List<String> {

    val actorMovies = mutableListOf<String>()

    for (movie in movies) {
        for (character in movie) {
            if (character.toLowerCase() == 'a' && movie.count { it == character } > 1) {
                actorMovies.add(movie)
            }
        }
    }

    return actorMovies
}
/**
 * This function takes an actor's name and a list of movies and returns the movies in which the actor appeared.
 *
 * @param actor The name of the actor/actress.
 * @param movies A list of movies.
 * @return A list of movies in which the actor appeared.
 */
fun findActorMovies(actor: String, movies: List<String>): List<String> {
/**
 * This function takes an actor's name and a list of movies and returns the movies in which the actor appeared.
 *
 * @param actor The name of the actor/actress.
 * @param movies A list of movies.
 * @return A list of movies in which the actor appeared.
 */
fun findActorMovies(actor: String, movies: List<String>): List<String> {

    val actorMovies = mutableListOf<String>()

    for (movie in movies) {
        for (character in movie) {
            if (character.toLowerCase() == 'a' && movie.count { it == character } > 1) {
                actorMovies.add(movie)
            }
        }
    }

    return actorMovies
}