# This program adds numbers from a file # and reports the sum of all the numbers. def main(): sum = 0.0 with open("numbers.dat") as file: for n in file.read().split(): sum += float(n) print("Sum is:", round(sum, 1)) main()