Answer:
See explaination for the program code
Explanation:
The Programming code:
inFile = open("stuff.txt", "r")
num = []
Sum = 0
for val in inFile.readlines():
value = val.split(",")
Sum = Sum + int(value[1])
print("Sum of second number on every line in the file is: ", Sum)
inFile.close()
Please kindly check attachment for output
It’s all depending on what method
Since resistance and current are inversely proportional, when the resistance doubles, the current is cut in half.