data_strings = ["10.0", "20.0", "30.0", "40.0", "50.0"] data_floats = [] for i in range(len(data_strings)): data_floats.append(float(data_strings[i])) def add (f, total): return total + f total = 0 for f in data_floats: total = add(f, total) print(total)