/**
 * This function calculates the total voltage drop across a series of resistances.
 * @param voltages A list of initial voltages
 * @param resistances A list of resistances in the circuit
 * @return The total voltage drop across the resistances
 */
fun calculateTotalVoltageDrop(voltages: List<Double>, resistances: List<Double>): Double {

    // Check if the voltages and resistances lists are valid
    if (voltages.size != resistances.size) {
        return 0.0
    }

    var totalVoltageDrop = 0.0

    // Loop through each voltage and resistance in the circuit
    for (i in voltages.indices) {
        totalVoltageDrop += voltages[i] * resistances[i]
    }

    return totalVoltageDrop
}
/**
 * This function calculates the total voltage drop across a series of resistances.
 * @param voltages A list of initial voltages
 * @param resistances A list of resistances in the circuit
 * @return The total voltage drop across the resistances
 */
fun calculateTotalVoltageDrop(voltages: List<Double>, resistances: List<Double>): Double {
/**
 * This function calculates the total voltage drop across a series of resistances.
 * @param voltages A list of initial voltages
 * @param resistances A list of resistances in the circuit
 * @return The total voltage drop across the resistances
 */
fun calculateTotalVoltageDrop(voltages: List<Double>, resistances: List<Double>): Double {

    // Check if the voltages and resistances lists are valid
    if (voltages.size != resistances.size) {
        return 0.0
    }

    var totalVoltageDrop = 0.0

    // Loop through each voltage and resistance in the circuit
    for (i in voltages.indices) {
        totalVoltageDrop += voltages[i] * resistances[i]
    }

    return totalVoltageDrop
}