/**
 * As an astronomer, you have a list of star brightness measurements taken throughout the night.
 * Your task is to count the number of stars that have a brightness greater than or equal to a certain threshold.
 *
 * Write a function that takes in a list of star brightness measurements and a threshold value.
 * The function should return the count of stars that have a brightness greater than or equal to the threshold.
 *
 * Example:
 * countStars(listOf(2, 4, 6, 8, 10), 5) -> 3
 *
 * In the example:
 * - The list [2, 4, 6, 8, 10] represents the star brightness measurements.
 * - The threshold value is 5.
 * - There are three stars (6, 8, 10) with a brightness greater than or equal to 5.
 *
 * Your task is to complete the countStars function to solve the problem.
 */
fun countStars(brightness: List<Int>, thresholdValue: Int): Int {

    var count = 0
    for (brightnessValue in brightness) {
        if (brightnessValue >= thresholdValue) {
            count++
        }
    }
    return count
}

// Calling the function with different inputs to test the implementation
/**
 * As an astronomer, you have a list of star brightness measurements taken throughout the night.
 * Your task is to count the number of stars that have a brightness greater than or equal to a certain threshold.
 *
 * Write a function that takes in a list of star brightness measurements and a threshold value.
 * The function should return the count of stars that have a brightness greater than or equal to the threshold.
 *
 * Example:
 * countStars(listOf(2, 4, 6, 8, 10), 5) -> 3
 *
 * In the example:
 * - The list [2, 4, 6, 8, 10] represents the star brightness measurements.
 * - The threshold value is 5.
 * - There are three stars (6, 8, 10) with a brightness greater than or equal to 5.
 *
 * Your task is to complete the countStars function to solve the problem.
 */
fun countStars(brightness: List<Int>, thresholdValue: Int): Int {
/**
 * As an astronomer, you have a list of star brightness measurements taken throughout the night.
 * Your task is to count the number of stars that have a brightness greater than or equal to a certain threshold.
 *
 * Write a function that takes in a list of star brightness measurements and a threshold value.
 * The function should return the count of stars that have a brightness greater than or equal to the threshold.
 *
 * Example:
 * countStars(listOf(2, 4, 6, 8, 10), 5) -> 3
 *
 * In the example:
 * - The list [2, 4, 6, 8, 10] represents the star brightness measurements.
 * - The threshold value is 5.
 * - There are three stars (6, 8, 10) with a brightness greater than or equal to 5.
 *
 * Your task is to complete the countStars function to solve the problem.
 */
fun countStars(brightness: List<Int>, thresholdValue: Int): Int {

    var count = 0
    for (brightnessValue in brightness) {
        if (brightnessValue >= thresholdValue) {
            count++
        }
    }
    return count
}

// Calling the function with different inputs to test the implementation