def main(): print("This program c reates a file of usernames from a file") infilename = input("type input file name") outfilename = input("type output file name") infile = open(infilename, 'r') outfile = open(outfilename, 'w') total = 0 for line in infile: first, last = line.split() total = total + eval(last) outfile.write("the total is equal to ") outfile.write(str(total)) infile.close() outfile.close() main()