/**
 * Given a message template and specific details (name, injury, duration),
 * modify the template by replacing certain elements with the provided details.
 * Finally, return the modified message.
 */
fun modifyOutput(message: String, name: String, injury: String, duration: Int): String {

    // Replace the placeholder {name} in the message with the given name
    var modifiedMessage = message.replace("{name}", name)

    // Replace the placeholder {injury} in the modified message with the given injury
    modifiedMessage = modifiedMessage.replace("{injury}", injury)

    // Calculate the age in weeks by multiplying the duration with 7
    val ageInWeeks = duration * 7

    // Replace the placeholder {duration} in the modified message with the age in weeks
    modifiedMessage = modifiedMessage.replace("{duration}", ageInWeeks.toString())

    return modifiedMessage
}
/**
 * Given a message template and specific details (name, injury, duration),
 * modify the template by replacing certain elements with the provided details.
 * Finally, return the modified message.
 */
fun modifyOutput(message: String, name: String, injury: String, duration: Int): String {
/**
 * Given a message template and specific details (name, injury, duration),
 * modify the template by replacing certain elements with the provided details.
 * Finally, return the modified message.
 */
fun modifyOutput(message: String, name: String, injury: String, duration: Int): String {

    // Replace the placeholder {name} in the message with the given name
    var modifiedMessage = message.replace("{name}", name)

    // Replace the placeholder {injury} in the modified message with the given injury
    modifiedMessage = modifiedMessage.replace("{injury}", injury)

    // Calculate the age in weeks by multiplying the duration with 7
    val ageInWeeks = duration * 7

    // Replace the placeholder {duration} in the modified message with the age in weeks
    modifiedMessage = modifiedMessage.replace("{duration}", ageInWeeks.toString())

    return modifiedMessage
}