/**
 * This function takes a list of transactions and a threshold value.
 * It divides the transaction amount by the threshold and returns a list of 
 * division results. If the division result is 0, it stops the loop using a 
 * break statement and returns the list of division results.
 *
 * @param transactions A list of transaction amounts as floats.
 * @param threshold A threshold value to divide the transaction amount by.
 * @return A list of division results as floats.
 */
fun calculateBudget(transactions: List<Float>, threshold: Float): List<Float> {

    val divisionResults = mutableListOf<Float>()
    
    for (amount in transactions) {
        if (amount == 0f) {
            divisionResults.add(0f)
            break
        }
        val divisionResult = amount / threshold
        divisionResults.add(divisionResult)
    }

    return divisionResults
}
/**
 * This function takes a list of transactions and a threshold value.
 * It divides the transaction amount by the threshold and returns a list of 
 * division results. If the division result is 0, it stops the loop using a 
 * break statement and returns the list of division results.
 *
 * @param transactions A list of transaction amounts as floats.
 * @param threshold A threshold value to divide the transaction amount by.
 * @return A list of division results as floats.
 */
fun calculateBudget(transactions: List<Float>, threshold: Float): List<Float> {
/**
 * This function takes a list of transactions and a threshold value.
 * It divides the transaction amount by the threshold and returns a list of 
 * division results. If the division result is 0, it stops the loop using a 
 * break statement and returns the list of division results.
 *
 * @param transactions A list of transaction amounts as floats.
 * @param threshold A threshold value to divide the transaction amount by.
 * @return A list of division results as floats.
 */
fun calculateBudget(transactions: List<Float>, threshold: Float): List<Float> {

    val divisionResults = mutableListOf<Float>()
    
    for (amount in transactions) {
        if (amount == 0f) {
            divisionResults.add(0f)
            break
        }
        val divisionResult = amount / threshold
        divisionResults.add(divisionResult)
    }

    return divisionResults
}