/**
 * This exercise requires the student to copy a list and modify its elements using a basic for loop.
 *
 * Given an original list and a modification value, the task is to create a copy of the original list and multiply each
 * element in the copied list by the modification value.
 *
 * Example:
 *
 * originalList = [1, 2, 3, 4, 5]
 * modificationValue = 10
 *
 * After copying and modifying the list, the output should be:
 * modifiedList = [10, 20, 30, 40, 50]
 */
fun copyAndModifyList(originalList: List<Int>, modificationValue: Int): List<Int> {

    // Create an empty list to store the modified elements
    val modifiedList = mutableListOf<Int>()
    
    // Iterate through each element in the original list
    for (element in originalList) {
        // Multiply the element by the modification value and append the result to the modified list
        modifiedList.add(element * modificationValue)
    }
    
    // Return the modified list
    return modifiedList
}
/**
 * This exercise requires the student to copy a list and modify its elements using a basic for loop.
 *
 * Given an original list and a modification value, the task is to create a copy of the original list and multiply each
 * element in the copied list by the modification value.
 *
 * Example:
 *
 * originalList = [1, 2, 3, 4, 5]
 * modificationValue = 10
 *
 * After copying and modifying the list, the output should be:
 * modifiedList = [10, 20, 30, 40, 50]
 */
fun copyAndModifyList(originalList: List<Int>, modificationValue: Int): List<Int> {
/**
 * This exercise requires the student to copy a list and modify its elements using a basic for loop.
 *
 * Given an original list and a modification value, the task is to create a copy of the original list and multiply each
 * element in the copied list by the modification value.
 *
 * Example:
 *
 * originalList = [1, 2, 3, 4, 5]
 * modificationValue = 10
 *
 * After copying and modifying the list, the output should be:
 * modifiedList = [10, 20, 30, 40, 50]
 */
fun copyAndModifyList(originalList: List<Int>, modificationValue: Int): List<Int> {

    // Create an empty list to store the modified elements
    val modifiedList = mutableListOf<Int>()
    
    // Iterate through each element in the original list
    for (element in originalList) {
        // Multiply the element by the modification value and append the result to the modified list
        modifiedList.add(element * modificationValue)
    }
    
    // Return the modified list
    return modifiedList
}