/**
 * Calculates the total income based on the given list of transactions.
 */
fun calculateTotalIncome(transactions: List<Pair<Float, String>>): Float {

    var totalIncome = 0.0f
    for (transaction in transactions) {
        if (transaction.second == "Income") {
            totalIncome += transaction.first
        }
    }
    return totalIncome
}
/**
 * Calculates the total income based on the given list of transactions.
 */
fun calculateTotalIncome(transactions: List<Pair<Float, String>>): Float {
/**
 * Calculates the total income based on the given list of transactions.
 */
fun calculateTotalIncome(transactions: List<Pair<Float, String>>): Float {

    var totalIncome = 0.0f
    for (transaction in transactions) {
        if (transaction.second == "Income") {
            totalIncome += transaction.first
        }
    }
    return totalIncome
}