/**
 * You are given a list of exercises to be performed by a physical therapist.
 * Your task is to implement a function that changes individual elements in the list and then concatenate them.
 *
 * Write a Kotlin function called 'changeElementAndConcatenate' that takes in two parameters:
 * - exerciseList: a list of exercises (each exercise is represented as a string)
 * - replacement: a string that will replace all elements in the exerciseList
 *
 * The function should perform the following tasks:
 * 1. Change each element in the exerciseList with the provided replacement string, while preserving the order.
 * 2. Concatenate all the modified elements of the exerciseList into a single string.
 * 3. Return the concatenated string.
 *
 * Example:
 * ----------
 * val exerciseList = listOf("Stretch", "Squat", "Lunge")
 * val replacement = "Jump"
 * changeElementAndConcatenate(exerciseList, replacement)
 *
 * Output:
 * -----------
 * "JumpJumpJump"
 */
fun changeElementAndConcatenate(exerciseList: List<String>, replacement: String): String {

    // Replacing individual elements in the exerciseList with the replacement
    val modifiedList = List(exerciseList.size) { replacement }

    // Concatenating the modified elements into a single string
    val concatenatedString = modifiedList.joinToString("")

    return concatenatedString
}
/**
 * You are given a list of exercises to be performed by a physical therapist.
 * Your task is to implement a function that changes individual elements in the list and then concatenate them.
 *
 * Write a Kotlin function called 'changeElementAndConcatenate' that takes in two parameters:
 * - exerciseList: a list of exercises (each exercise is represented as a string)
 * - replacement: a string that will replace all elements in the exerciseList
 *
 * The function should perform the following tasks:
 * 1. Change each element in the exerciseList with the provided replacement string, while preserving the order.
 * 2. Concatenate all the modified elements of the exerciseList into a single string.
 * 3. Return the concatenated string.
 *
 * Example:
 * ----------
 * val exerciseList = listOf("Stretch", "Squat", "Lunge")
 * val replacement = "Jump"
 * changeElementAndConcatenate(exerciseList, replacement)
 *
 * Output:
 * -----------
 * "JumpJumpJump"
 */
fun changeElementAndConcatenate(exerciseList: List<String>, replacement: String): String {
/**
 * You are given a list of exercises to be performed by a physical therapist.
 * Your task is to implement a function that changes individual elements in the list and then concatenate them.
 *
 * Write a Kotlin function called 'changeElementAndConcatenate' that takes in two parameters:
 * - exerciseList: a list of exercises (each exercise is represented as a string)
 * - replacement: a string that will replace all elements in the exerciseList
 *
 * The function should perform the following tasks:
 * 1. Change each element in the exerciseList with the provided replacement string, while preserving the order.
 * 2. Concatenate all the modified elements of the exerciseList into a single string.
 * 3. Return the concatenated string.
 *
 * Example:
 * ----------
 * val exerciseList = listOf("Stretch", "Squat", "Lunge")
 * val replacement = "Jump"
 * changeElementAndConcatenate(exerciseList, replacement)
 *
 * Output:
 * -----------
 * "JumpJumpJump"
 */
fun changeElementAndConcatenate(exerciseList: List<String>, replacement: String): String {

    // Replacing individual elements in the exerciseList with the replacement
    val modifiedList = List(exerciseList.size) { replacement }

    // Concatenating the modified elements into a single string
    val concatenatedString = modifiedList.joinToString("")

    return concatenatedString
}