/**
 * A dancer performs a series of dance moves.
 *
 * @param dancer The name of the dancer.
 * @param moveCount The number of dance moves to perform.
 * @return The final dance move performed by the dancer.
 */
fun danceMove(dancer: String, moveCount: Int): String {

    // List of dance moves
    val danceMoves = listOf("step", "twist", "jump", "spin", "slide", "shake")

    var currentMove = ""
    
    // Loop to perform the dance moves
    repeat(moveCount) { i ->
        // Complete the exercise by writing code that selects a random dance move from the list 'danceMoves'
        // and assigns it to the variable 'currentMove'
        currentMove = danceMoves.random()

        println("$dancer is performing move ${i + 1}: $currentMove")
    }

    return currentMove
}
/**
 * A dancer performs a series of dance moves.
 *
 * @param dancer The name of the dancer.
 * @param moveCount The number of dance moves to perform.
 * @return The final dance move performed by the dancer.
 */
fun danceMove(dancer: String, moveCount: Int): String {
/**
 * A dancer performs a series of dance moves.
 *
 * @param dancer The name of the dancer.
 * @param moveCount The number of dance moves to perform.
 * @return The final dance move performed by the dancer.
 */
fun danceMove(dancer: String, moveCount: Int): String {

    // List of dance moves
    val danceMoves = listOf("step", "twist", "jump", "spin", "slide", "shake")

    var currentMove = ""
    
    // Loop to perform the dance moves
    repeat(moveCount) { i ->
        // Complete the exercise by writing code that selects a random dance move from the list 'danceMoves'
        // and assigns it to the variable 'currentMove'
        currentMove = danceMoves.random()

        println("$dancer is performing move ${i + 1}: $currentMove")
    }

    return currentMove
}