/**
 * The purpose of this exercise is to test your understanding of copying lists and accessing elements in a list.
 *
 * Instructions:
 * - The function takes in a list of photos and an index as arguments.
 * - Your task is to make a deep copy of the list of photos and access the element at the given index in the copied list.
 *
 * Requirements:
 * - Your solution should use list slicing to create a copy of the list.
 * - The copied list should be stored in a variable called 'copiedPhotos'.
 * - The element at the given index in the copied list should be stored in a variable called 'accessedPhoto'.
 * - Finally, return the 'accessedPhoto'.
 *
 * Example:
 * photos = ['photo1.jpg', 'photo2.jpg', 'photo3.jpg', 'photo4.jpg']
 * index = 2
 *
 * Expected Output:
 * 'photo3.jpg'
 */
fun copyAndAccessElements(photos: List<String>, index: Int): String {

    // Copy the list of photos using list slicing
    val copiedPhotos = photos.toMutableList()

    // Access the element at the given index in the copied list
    val accessedPhoto = copiedPhotos[index]

    // Return the accessed photo
    return accessedPhoto
}
/**
 * The purpose of this exercise is to test your understanding of copying lists and accessing elements in a list.
 *
 * Instructions:
 * - The function takes in a list of photos and an index as arguments.
 * - Your task is to make a deep copy of the list of photos and access the element at the given index in the copied list.
 *
 * Requirements:
 * - Your solution should use list slicing to create a copy of the list.
 * - The copied list should be stored in a variable called 'copiedPhotos'.
 * - The element at the given index in the copied list should be stored in a variable called 'accessedPhoto'.
 * - Finally, return the 'accessedPhoto'.
 *
 * Example:
 * photos = ['photo1.jpg', 'photo2.jpg', 'photo3.jpg', 'photo4.jpg']
 * index = 2
 *
 * Expected Output:
 * 'photo3.jpg'
 */
fun copyAndAccessElements(photos: List<String>, index: Int): String {
/**
 * The purpose of this exercise is to test your understanding of copying lists and accessing elements in a list.
 *
 * Instructions:
 * - The function takes in a list of photos and an index as arguments.
 * - Your task is to make a deep copy of the list of photos and access the element at the given index in the copied list.
 *
 * Requirements:
 * - Your solution should use list slicing to create a copy of the list.
 * - The copied list should be stored in a variable called 'copiedPhotos'.
 * - The element at the given index in the copied list should be stored in a variable called 'accessedPhoto'.
 * - Finally, return the 'accessedPhoto'.
 *
 * Example:
 * photos = ['photo1.jpg', 'photo2.jpg', 'photo3.jpg', 'photo4.jpg']
 * index = 2
 *
 * Expected Output:
 * 'photo3.jpg'
 */
fun copyAndAccessElements(photos: List<String>, index: Int): String {

    // Copy the list of photos using list slicing
    val copiedPhotos = photos.toMutableList()

    // Access the element at the given index in the copied list
    val accessedPhoto = copiedPhotos[index]

    // Return the accessed photo
    return accessedPhoto
}