Copy-paste code
examples/functions/sums.py
a = [2, 3, 93, 18] b = [27, 81, 11, 35] c = [32, 105, 1] total_a = 0 for v in a: total_a += v print("sum of a: {} average of a: {}".format(total_a, total_a / len(a))) total_b = 0 for v in b: total_b += v print("sum of b: {} average of b: {}".format(total_b, total_b / len(b))) total_c = 0 for v in c: total_c += v print("sum of c: {} average of c: {}".format(total_c, total_c / len(a)))
sum of a: 116 average of a: 29.0 sum of b: 154 average of b: 38.5 sum of c: 138 average of c: 34.5
Did you notice the bug?