/**
 * This exercise requires writing a function to determine the next dance move for a dancer
 * based on whether they have a partner or not. The function takes in the dancer's name, a list
 * of available dance moves, and a boolean value indicating whether they have a partner or not.
 * The function should return the next dance move from the available options for the dancer,
 * and if they have a partner, the move should be capitalized.
 *
 * Example:
 * dance("Alice", listOf("spin", "jump", "slide"), true)  ->  "JUMP"
 *
 * Complete the code below to solve the exercise.
 */
fun dance(dancerName: String, danceMoves: List<String>, partner: Boolean): String {

    // If there is no partner, select a random dance move
    if (!partner) {
        return danceMoves[0]
    }

    // Select a random dance move and capitalize it for partner dance
    return danceMoves[0].toUpperCase()
}
/**
 * This exercise requires writing a function to determine the next dance move for a dancer
 * based on whether they have a partner or not. The function takes in the dancer's name, a list
 * of available dance moves, and a boolean value indicating whether they have a partner or not.
 * The function should return the next dance move from the available options for the dancer,
 * and if they have a partner, the move should be capitalized.
 *
 * Example:
 * dance("Alice", listOf("spin", "jump", "slide"), true)  ->  "JUMP"
 *
 * Complete the code below to solve the exercise.
 */
fun dance(dancerName: String, danceMoves: List<String>, partner: Boolean): String {
/**
 * This exercise requires writing a function to determine the next dance move for a dancer
 * based on whether they have a partner or not. The function takes in the dancer's name, a list
 * of available dance moves, and a boolean value indicating whether they have a partner or not.
 * The function should return the next dance move from the available options for the dancer,
 * and if they have a partner, the move should be capitalized.
 *
 * Example:
 * dance("Alice", listOf("spin", "jump", "slide"), true)  ->  "JUMP"
 *
 * Complete the code below to solve the exercise.
 */
fun dance(dancerName: String, danceMoves: List<String>, partner: Boolean): String {

    // If there is no partner, select a random dance move
    if (!partner) {
        return danceMoves[0]
    }

    // Select a random dance move and capitalize it for partner dance
    return danceMoves[0].toUpperCase()
}