/**
 * Given a list of resistances, calculate the total resistance.
 * Each resistance is a pair with the resistance value and tolerance.
 *
 * @param resistances list of resistances as pairs (resistance, tolerance)
 * @return total resistance
 */
fun calculateTotalResistance(resistances: List<Pair<Double, Double>>): Double {

    var totalResistance = 0.0

    for ((resistance, _) in resistances) {
        totalResistance += resistance
    }

    return totalResistance
}
/**
 * Given a list of resistances, calculate the total resistance.
 * Each resistance is a pair with the resistance value and tolerance.
 *
 * @param resistances list of resistances as pairs (resistance, tolerance)
 * @return total resistance
 */
fun calculateTotalResistance(resistances: List<Pair<Double, Double>>): Double {
/**
 * Given a list of resistances, calculate the total resistance.
 * Each resistance is a pair with the resistance value and tolerance.
 *
 * @param resistances list of resistances as pairs (resistance, tolerance)
 * @return total resistance
 */
fun calculateTotalResistance(resistances: List<Pair<Double, Double>>): Double {

    var totalResistance = 0.0

    for ((resistance, _) in resistances) {
        totalResistance += resistance
    }

    return totalResistance
}