/**
 * Given a dictionary moviesToOscar which maps movie names to the number of oscars won,
 * write a function that finds the number of oscars won by the actress.
 *
 * @param actress The name of the actress.
 * @param moviesToOscar A dictionary mapping movie names to the number of oscars won.
 * @return The total number of oscars won by the actress.
 */
fun findOscars(actress: String, moviesToOscar: Map<String, Int>): Int {

    var totalOscarCount = 0
    for ((movie, oscarCount) in moviesToOscar) {
        if (actress in movie) {
            totalOscarCount += oscarCount
        }
    }
    return totalOscarCount
}
/**
 * Given a dictionary moviesToOscar which maps movie names to the number of oscars won,
 * write a function that finds the number of oscars won by the actress.
 *
 * @param actress The name of the actress.
 * @param moviesToOscar A dictionary mapping movie names to the number of oscars won.
 * @return The total number of oscars won by the actress.
 */
fun findOscars(actress: String, moviesToOscar: Map<String, Int>): Int {
/**
 * Given a dictionary moviesToOscar which maps movie names to the number of oscars won,
 * write a function that finds the number of oscars won by the actress.
 *
 * @param actress The name of the actress.
 * @param moviesToOscar A dictionary mapping movie names to the number of oscars won.
 * @return The total number of oscars won by the actress.
 */
fun findOscars(actress: String, moviesToOscar: Map<String, Int>): Int {

    var totalOscarCount = 0
    for ((movie, oscarCount) in moviesToOscar) {
        if (actress in movie) {
            totalOscarCount += oscarCount
        }
    }
    return totalOscarCount
}