def resistor_series(resistors: list[float]) -> float:
    sum_r = 0.00
    index = 0
    for resistor in resistors:
        sum_r += resistor
        if resistor < 0:
            raise ValueError(f"Resistor at index {index} has a negative value!")
        index += 1
    return sum_r