/**
 * This function takes an artist's name and the number of times to repeat their name,
 * and combines them in a specific pattern to create an artwork.
 *
 * @param artistName Name of the artist.
 * @param numTimes Number of times to repeat the artist's name.
 * @return Combined pattern of the artist's name.
 *
 * Example:
 * Input:
 * artistName = "Picasso"
 * numTimes = 3
 *
 * Output:
 * 'PicassoPicasPic'
 */
fun createArtwork(artistName: String, numTimes: Int): String {

    var artwork = ""
    var counter = 0

    while (counter < numTimes) {
        artwork += artistName.substring(0, counter + 1)
        counter++
    }

    return artwork
}
/**
 * This function takes an artist's name and the number of times to repeat their name,
 * and combines them in a specific pattern to create an artwork.
 *
 * @param artistName Name of the artist.
 * @param numTimes Number of times to repeat the artist's name.
 * @return Combined pattern of the artist's name.
 *
 * Example:
 * Input:
 * artistName = "Picasso"
 * numTimes = 3
 *
 * Output:
 * 'PicassoPicasPic'
 */
fun createArtwork(artistName: String, numTimes: Int): String {
/**
 * This function takes an artist's name and the number of times to repeat their name,
 * and combines them in a specific pattern to create an artwork.
 *
 * @param artistName Name of the artist.
 * @param numTimes Number of times to repeat the artist's name.
 * @return Combined pattern of the artist's name.
 *
 * Example:
 * Input:
 * artistName = "Picasso"
 * numTimes = 3
 *
 * Output:
 * 'PicassoPicasPic'
 */
fun createArtwork(artistName: String, numTimes: Int): String {

    var artwork = ""
    var counter = 0

    while (counter < numTimes) {
        artwork += artistName.substring(0, counter + 1)
        counter++
    }

    return artwork
}