/**
 * Given a list of photo file paths and a keyword,
 * count the number of photos that contain the keyword in their filename and return the count.
 *
 * @param photoList A list of photo file paths.
 * @param keyword The keyword to search for in the photo filenames.
 * @return The count of photos that contain the keyword in their filename.
 */
fun analyzePhotos(photoList: List<String>, keyword: String): Int {

    var count = 0  // Initialize count variable to 0

    // Iterate through each photo file path in the photoList
    for (photo in photoList) {
        // Extract the filename from the photo file path
        // by splitting the path on '/' and getting the last element
        val filename = photo.split('/').last()

        // Check if the keyword is present in the filename
        if (keyword in filename) {
            // If it is, increment the count variable by 1
            count++
        }
    }

    return count
}
/**
 * Given a list of photo file paths and a keyword,
 * count the number of photos that contain the keyword in their filename and return the count.
 *
 * @param photoList A list of photo file paths.
 * @param keyword The keyword to search for in the photo filenames.
 * @return The count of photos that contain the keyword in their filename.
 */
fun analyzePhotos(photoList: List<String>, keyword: String): Int {
/**
 * Given a list of photo file paths and a keyword,
 * count the number of photos that contain the keyword in their filename and return the count.
 *
 * @param photoList A list of photo file paths.
 * @param keyword The keyword to search for in the photo filenames.
 * @return The count of photos that contain the keyword in their filename.
 */
fun analyzePhotos(photoList: List<String>, keyword: String): Int {

    var count = 0  // Initialize count variable to 0

    // Iterate through each photo file path in the photoList
    for (photo in photoList) {
        // Extract the filename from the photo file path
        // by splitting the path on '/' and getting the last element
        val filename = photo.split('/').last()

        // Check if the keyword is present in the filename
        if (keyword in filename) {
            // If it is, increment the count variable by 1
            count++
        }
    }

    return count
}