/**
 * Calculates the number of stars that are brighter than a given threshold magnitude.
 *
 * @param starMagnitudes A list of float values representing the magnitudes of stars.
 * @param threshold The magnitude threshold.
 * @return The number of stars brighter than the threshold magnitude.
 */
fun intersectionOfExamplesAndIteration(starMagnitudes: List<Float>, threshold: Float): Int {

    var count = 0  // Initialize the count variable

    for (magnitude in starMagnitudes) {
        if (magnitude < threshold) {
            count++  // Increment count for each star brighter than the threshold
        }
    }

    return count
}

// Example usage
/**
 * Calculates the number of stars that are brighter than a given threshold magnitude.
 *
 * @param starMagnitudes A list of float values representing the magnitudes of stars.
 * @param threshold The magnitude threshold.
 * @return The number of stars brighter than the threshold magnitude.
 */
fun intersectionOfExamplesAndIteration(starMagnitudes: List<Float>, threshold: Float): Int {
/**
 * Calculates the number of stars that are brighter than a given threshold magnitude.
 *
 * @param starMagnitudes A list of float values representing the magnitudes of stars.
 * @param threshold The magnitude threshold.
 * @return The number of stars brighter than the threshold magnitude.
 */
fun intersectionOfExamplesAndIteration(starMagnitudes: List<Float>, threshold: Float): Int {

    var count = 0  // Initialize the count variable

    for (magnitude in starMagnitudes) {
        if (magnitude < threshold) {
            count++  // Increment count for each star brighter than the threshold
        }
    }

    return count
}

// Example usage