/**
 * In a dance competition, two dancers are performing a dance routine.
 * You are given the names of the dancers and the type of music they are dancing to.
 *
 * Write a function that determines whether the dancers should perform their routine or not based on the following conditions:
 * - If both dancers are null, return false.
 * - If one of the dancers is null, return true.
 * - If the type of music is 'Slow' and both dancers' names have an odd number of characters, return true.
 * - If the type of music is 'Fast' and both dancers' names have an even number of characters, return true.
 * - If none of the above conditions are met, return false.
 *
 * @param dancer1 The name of the first dancer.
 * @param dancer2 The name of the second dancer.
 * @param music The type of music: 'Slow' or 'Fast'.
 * @return True if the dancers should perform the routine, false otherwise.
 */
fun danceStyle(dancer1: String?, dancer2: String?, music: String): Boolean {

    if (dancer1 == null && dancer2 == null) {
        return false
    } else if (dancer1 == null || dancer2 == null) {
        return true
    } else if (music == "Slow" && dancer1.length % 2 != 0 && dancer2.length % 2 != 0) {
        return true
    } else if (music == "Fast" && dancer1.length % 2 == 0 && dancer2.length % 2 == 0) {
        return true
    }
    return false
}
/**
 * In a dance competition, two dancers are performing a dance routine.
 * You are given the names of the dancers and the type of music they are dancing to.
 *
 * Write a function that determines whether the dancers should perform their routine or not based on the following conditions:
 * - If both dancers are null, return false.
 * - If one of the dancers is null, return true.
 * - If the type of music is 'Slow' and both dancers' names have an odd number of characters, return true.
 * - If the type of music is 'Fast' and both dancers' names have an even number of characters, return true.
 * - If none of the above conditions are met, return false.
 *
 * @param dancer1 The name of the first dancer.
 * @param dancer2 The name of the second dancer.
 * @param music The type of music: 'Slow' or 'Fast'.
 * @return True if the dancers should perform the routine, false otherwise.
 */
fun danceStyle(dancer1: String?, dancer2: String?, music: String): Boolean {
/**
 * In a dance competition, two dancers are performing a dance routine.
 * You are given the names of the dancers and the type of music they are dancing to.
 *
 * Write a function that determines whether the dancers should perform their routine or not based on the following conditions:
 * - If both dancers are null, return false.
 * - If one of the dancers is null, return true.
 * - If the type of music is 'Slow' and both dancers' names have an odd number of characters, return true.
 * - If the type of music is 'Fast' and both dancers' names have an even number of characters, return true.
 * - If none of the above conditions are met, return false.
 *
 * @param dancer1 The name of the first dancer.
 * @param dancer2 The name of the second dancer.
 * @param music The type of music: 'Slow' or 'Fast'.
 * @return True if the dancers should perform the routine, false otherwise.
 */
fun danceStyle(dancer1: String?, dancer2: String?, music: String): Boolean {

    if (dancer1 == null && dancer2 == null) {
        return false
    } else if (dancer1 == null || dancer2 == null) {
        return true
    } else if (music == "Slow" && dancer1.length % 2 != 0 && dancer2.length % 2 != 0) {
        return true
    } else if (music == "Fast" && dancer1.length % 2 == 0 && dancer2.length % 2 == 0) {
        return true
    }
    return false
}