/**
 * This function checks if the given temperatures fall within the range specified by the lower and upper bounds.
 *
 * @param temperatures A list of temperatures.
 * @param lowerBound The lower bound of the temperature range.
 * @param upperBound The upper bound of the temperature range.
 * @return A list of temperatures that fall within the specified range.
 */
fun checkTemperature(temperatures: List<Double>, lowerBound: Double, upperBound: Double): List<Double> {

    // Initialize an empty list to store the valid temperatures
    val validTemperatures = mutableListOf<Double>()
    
    // Iterate through each temperature in the given list
    for (temperature in temperatures) {
        // Check if the temperature falls within the specified range
        if (temperature in lowerBound..upperBound) {
            validTemperatures.add(temperature) // Add the valid temperature to the list
        }
    }
    
    return validTemperatures
}
/**
 * This function checks if the given temperatures fall within the range specified by the lower and upper bounds.
 *
 * @param temperatures A list of temperatures.
 * @param lowerBound The lower bound of the temperature range.
 * @param upperBound The upper bound of the temperature range.
 * @return A list of temperatures that fall within the specified range.
 */
fun checkTemperature(temperatures: List<Double>, lowerBound: Double, upperBound: Double): List<Double> {
/**
 * This function checks if the given temperatures fall within the range specified by the lower and upper bounds.
 *
 * @param temperatures A list of temperatures.
 * @param lowerBound The lower bound of the temperature range.
 * @param upperBound The upper bound of the temperature range.
 * @return A list of temperatures that fall within the specified range.
 */
fun checkTemperature(temperatures: List<Double>, lowerBound: Double, upperBound: Double): List<Double> {

    // Initialize an empty list to store the valid temperatures
    val validTemperatures = mutableListOf<Double>()
    
    // Iterate through each temperature in the given list
    for (temperature in temperatures) {
        // Check if the temperature falls within the specified range
        if (temperature in lowerBound..upperBound) {
            validTemperatures.add(temperature) // Add the valid temperature to the list
        }
    }
    
    return validTemperatures
}