/**
 * Given a dictionary (star_info) containing information about the brightness of different stars and a tuple 
 * (observations) representing a series of observations made by an astronomer, calculate the average 
 * brightness of the observed stars and return it.
 *
 * @param star_info: a dictionary where the keys are the star names (str) and the values are the corresponding
 * brightness values (float).
 * @param observations: a tuple containing the names of the observed stars (str).
 * @return average_brightness: a float representing the average brightness of the observed stars.
 *
 * Example:
 * calculateStarBrightness(mapOf("Sirius" to 12.5, "Polaris" to 9.8, "Betelgeuse" to 8.2), listOf("Polaris", "Sirius"))
 * Expected output: 11.15
 */
fun calculateStarBrightness(star_info: Map<String, Float>, observations: List<String>): Float {

    var totalBrightness = 0.0f
    var observedCount = 0

    for (star in observations) {
        totalBrightness += star_info.getOrDefault(star, 0f)
        observedCount++
    }

    val averageBrightness = totalBrightness / observedCount
    return averageBrightness
}
/**
 * Given a dictionary (star_info) containing information about the brightness of different stars and a tuple 
 * (observations) representing a series of observations made by an astronomer, calculate the average 
 * brightness of the observed stars and return it.
 *
 * @param star_info: a dictionary where the keys are the star names (str) and the values are the corresponding
 * brightness values (float).
 * @param observations: a tuple containing the names of the observed stars (str).
 * @return average_brightness: a float representing the average brightness of the observed stars.
 *
 * Example:
 * calculateStarBrightness(mapOf("Sirius" to 12.5, "Polaris" to 9.8, "Betelgeuse" to 8.2), listOf("Polaris", "Sirius"))
 * Expected output: 11.15
 */
fun calculateStarBrightness(star_info: Map<String, Float>, observations: List<String>): Float {
/**
 * Given a dictionary (star_info) containing information about the brightness of different stars and a tuple 
 * (observations) representing a series of observations made by an astronomer, calculate the average 
 * brightness of the observed stars and return it.
 *
 * @param star_info: a dictionary where the keys are the star names (str) and the values are the corresponding
 * brightness values (float).
 * @param observations: a tuple containing the names of the observed stars (str).
 * @return average_brightness: a float representing the average brightness of the observed stars.
 *
 * Example:
 * calculateStarBrightness(mapOf("Sirius" to 12.5, "Polaris" to 9.8, "Betelgeuse" to 8.2), listOf("Polaris", "Sirius"))
 * Expected output: 11.15
 */
fun calculateStarBrightness(star_info: Map<String, Float>, observations: List<String>): Float {

    var totalBrightness = 0.0f
    var observedCount = 0

    for (star in observations) {
        totalBrightness += star_info.getOrDefault(star, 0f)
        observedCount++
    }

    val averageBrightness = totalBrightness / observedCount
    return averageBrightness
}