/**
 * Given a list of yearly inflation data and a threshold value, this function calculates the total number of years
 * where the inflation rate exceeded the threshold, and returns the calculated value.
 *
 * @param yearlyData a list of yearly inflation rates (float numbers)
 * @param threshold a threshold value (float number)
 * @return an integer representing the total number of years where the inflation rate exceeded the threshold
 */
fun calculateInflation(yearlyData: List<Float>, threshold: Float): Int {

    var total = 0

    for (year in yearlyData) {
        if (year > threshold) {
            total++
        }
    }

    return total
}
/**
 * Given a list of yearly inflation data and a threshold value, this function calculates the total number of years
 * where the inflation rate exceeded the threshold, and returns the calculated value.
 *
 * @param yearlyData a list of yearly inflation rates (float numbers)
 * @param threshold a threshold value (float number)
 * @return an integer representing the total number of years where the inflation rate exceeded the threshold
 */
fun calculateInflation(yearlyData: List<Float>, threshold: Float): Int {
/**
 * Given a list of yearly inflation data and a threshold value, this function calculates the total number of years
 * where the inflation rate exceeded the threshold, and returns the calculated value.
 *
 * @param yearlyData a list of yearly inflation rates (float numbers)
 * @param threshold a threshold value (float number)
 * @return an integer representing the total number of years where the inflation rate exceeded the threshold
 */
fun calculateInflation(yearlyData: List<Float>, threshold: Float): Int {

    var total = 0

    for (year in yearlyData) {
        if (year > threshold) {
            total++
        }
    }

    return total
}