/**
 * A musician wants to add new tracks to their existing collection of tracks.
 * Write a function that takes in a list of tracks and a number of new tracks to add.
 * The function should return the updated list after appending the new tracks.
 *
 * @param tracks A list of strings representing the existing tracks
 * @param numNewTracks An integer representing the number of new tracks to append
 * @return A list of strings representing the updated collection of tracks
 *
 * Example:
 * musicianTracks(listOf("Track 1", "Track 2", "Track 3"), 4)
 * Output: ["Track 1", "Track 2", "Track 3", "New Track 1", "New Track 2", "New Track 3", "New Track 4"]
 */
fun musicianTracks(tracks: List<String>, numNewTracks: Int): List<String> {

    // Generate a list of new tracks based on the given number of new tracks
    val newTracks = (1..numNewTracks).map { "New Track $it" }

    // Append the new tracks to the existing collection of tracks
    val updatedTracks = tracks.toMutableList()
    updatedTracks.addAll(newTracks)

    return updatedTracks
}
/**
 * A musician wants to add new tracks to their existing collection of tracks.
 * Write a function that takes in a list of tracks and a number of new tracks to add.
 * The function should return the updated list after appending the new tracks.
 *
 * @param tracks A list of strings representing the existing tracks
 * @param numNewTracks An integer representing the number of new tracks to append
 * @return A list of strings representing the updated collection of tracks
 *
 * Example:
 * musicianTracks(listOf("Track 1", "Track 2", "Track 3"), 4)
 * Output: ["Track 1", "Track 2", "Track 3", "New Track 1", "New Track 2", "New Track 3", "New Track 4"]
 */
fun musicianTracks(tracks: List<String>, numNewTracks: Int): List<String> {
/**
 * A musician wants to add new tracks to their existing collection of tracks.
 * Write a function that takes in a list of tracks and a number of new tracks to add.
 * The function should return the updated list after appending the new tracks.
 *
 * @param tracks A list of strings representing the existing tracks
 * @param numNewTracks An integer representing the number of new tracks to append
 * @return A list of strings representing the updated collection of tracks
 *
 * Example:
 * musicianTracks(listOf("Track 1", "Track 2", "Track 3"), 4)
 * Output: ["Track 1", "Track 2", "Track 3", "New Track 1", "New Track 2", "New Track 3", "New Track 4"]
 */
fun musicianTracks(tracks: List<String>, numNewTracks: Int): List<String> {

    // Generate a list of new tracks based on the given number of new tracks
    val newTracks = (1..numNewTracks).map { "New Track $it" }

    // Append the new tracks to the existing collection of tracks
    val updatedTracks = tracks.toMutableList()
    updatedTracks.addAll(newTracks)

    return updatedTracks
}