/**
 * Given the number of dance steps, whether the dancer is spinning, and whether the dancer is waving, 
 * this function performs the appropriate dance moves based on the specified conditions.
 *
 * Example:
 * If steps = 5, isSpinning = true, isWaving = false
 * Output: "Performing 5 dance steps and spinning"
 *
 * If steps = 3, isSpinning = false, isWaving = true
 * Output: "Performing 3 dance steps and waving"
 *
 * If steps = 4, isSpinning = true, isWaving = true
 * Output: "Performing 4 dance steps, spinning, and waving"
 */
fun dancerMoves(steps: Int, isSpinning: Boolean, isWaving: Boolean) {

    if (steps > 0) {
        when {
            isSpinning && isWaving -> println("Performing $steps dance steps, spinning, and waving")
            isSpinning -> println("Performing $steps dance steps and spinning")
            isWaving -> println("Performing $steps dance steps and waving")
            else -> println("Performing $steps dance steps")
        }
    }
}
/**
 * Given the number of dance steps, whether the dancer is spinning, and whether the dancer is waving, 
 * this function performs the appropriate dance moves based on the specified conditions.
 *
 * Example:
 * If steps = 5, isSpinning = true, isWaving = false
 * Output: "Performing 5 dance steps and spinning"
 *
 * If steps = 3, isSpinning = false, isWaving = true
 * Output: "Performing 3 dance steps and waving"
 *
 * If steps = 4, isSpinning = true, isWaving = true
 * Output: "Performing 4 dance steps, spinning, and waving"
 */
fun dancerMoves(steps: Int, isSpinning: Boolean, isWaving: Boolean) {
/**
 * Given the number of dance steps, whether the dancer is spinning, and whether the dancer is waving, 
 * this function performs the appropriate dance moves based on the specified conditions.
 *
 * Example:
 * If steps = 5, isSpinning = true, isWaving = false
 * Output: "Performing 5 dance steps and spinning"
 *
 * If steps = 3, isSpinning = false, isWaving = true
 * Output: "Performing 3 dance steps and waving"
 *
 * If steps = 4, isSpinning = true, isWaving = true
 * Output: "Performing 4 dance steps, spinning, and waving"
 */
fun dancerMoves(steps: Int, isSpinning: Boolean, isWaving: Boolean) {

    if (steps > 0) {
        when {
            isSpinning && isWaving -> println("Performing $steps dance steps, spinning, and waving")
            isSpinning -> println("Performing $steps dance steps and spinning")
            isWaving -> println("Performing $steps dance steps and waving")
            else -> println("Performing $steps dance steps")
        }
    }
}