Pure Programmer
Blue Matrix


Cluster Map

Project: Total Filter (Floating Point)

Write a filter program that accepts text representations of floating point values, one per line, and then computes and prints the total. The program should print an error to STDERR if a line of input can't be parsed as a floating point value.

Output
$ python TotalFilterFP.py < ../../data/text/FPList1.txt 520.24 $ python TotalFilterFP.py < ../../data/text/FPList2.txt 50273.8 $ python TotalFilterFP.py < ../../data/text/FPList3.txt 4.99077e+06

Solution