/**
 * This function takes in a list of expenses and a specified category and returns the sum of all expenses
 * for that category.
 *
 * @param expenses List of expenses.
 * @param category Specified category to calculate the sum of expenses.
 * @return Total sum of all expenses for the specified category.
 */
fun calculateSumOfExpenses(expenses: List<Pair<String, Float>>, category: String): Float {

    var totalSum = 0.0f

    for (expense in expenses) {
        if (expense.first == category) {
            totalSum += expense.second
        }
    }

    return totalSum
}
/**
 * This function takes in a list of expenses and a specified category and returns the sum of all expenses
 * for that category.
 *
 * @param expenses List of expenses.
 * @param category Specified category to calculate the sum of expenses.
 * @return Total sum of all expenses for the specified category.
 */
fun calculateSumOfExpenses(expenses: List<Pair<String, Float>>, category: String): Float {
/**
 * This function takes in a list of expenses and a specified category and returns the sum of all expenses
 * for that category.
 *
 * @param expenses List of expenses.
 * @param category Specified category to calculate the sum of expenses.
 * @return Total sum of all expenses for the specified category.
 */
fun calculateSumOfExpenses(expenses: List<Pair<String, Float>>, category: String): Float {

    var totalSum = 0.0f

    for (expense in expenses) {
        if (expense.first == category) {
            totalSum += expense.second
        }
    }

    return totalSum
}