/**
 * You are an interior designer working on a project and need to count the number of colors used, excluding a
 * specified color. Write a function that takes in a list of colors and a color to skip, and returns the count
 * of colors used, excluding the color to skip.
 *
 * @param colors A list of colors used in the project.
 * @param colorToSkip The color to be skipped for counting.
 * @return The count of colors used, excluding the color to skip.
 *
 * Example:
 * countColors(listOf("red", "blue", "green", "red", "yellow"), "red")
 * Output: 2
 *
 * Hint:
 * Use a for loop to iterate over the list of colors.
 * Use the continue statement to skip counting the specified color.
 * Track the count of colors used using a variable.
 */
fun countColors(colors: List<String>, colorToSkip: String): Int {

    var count = 0
    for (color in colors) {
        if (color == colorToSkip) {
            continue
        }
        count++
    }
    return count
}
/**
 * You are an interior designer working on a project and need to count the number of colors used, excluding a
 * specified color. Write a function that takes in a list of colors and a color to skip, and returns the count
 * of colors used, excluding the color to skip.
 *
 * @param colors A list of colors used in the project.
 * @param colorToSkip The color to be skipped for counting.
 * @return The count of colors used, excluding the color to skip.
 *
 * Example:
 * countColors(listOf("red", "blue", "green", "red", "yellow"), "red")
 * Output: 2
 *
 * Hint:
 * Use a for loop to iterate over the list of colors.
 * Use the continue statement to skip counting the specified color.
 * Track the count of colors used using a variable.
 */
fun countColors(colors: List<String>, colorToSkip: String): Int {
/**
 * You are an interior designer working on a project and need to count the number of colors used, excluding a
 * specified color. Write a function that takes in a list of colors and a color to skip, and returns the count
 * of colors used, excluding the color to skip.
 *
 * @param colors A list of colors used in the project.
 * @param colorToSkip The color to be skipped for counting.
 * @return The count of colors used, excluding the color to skip.
 *
 * Example:
 * countColors(listOf("red", "blue", "green", "red", "yellow"), "red")
 * Output: 2
 *
 * Hint:
 * Use a for loop to iterate over the list of colors.
 * Use the continue statement to skip counting the specified color.
 * Track the count of colors used using a variable.
 */
fun countColors(colors: List<String>, colorToSkip: String): Int {

    var count = 0
    for (color in colors) {
        if (color == colorToSkip) {
            continue
        }
        count++
    }
    return count
}