d154dc21a2a96bcbc93eb3e121ff38bc419b58e5
[living-lab-site.git] / cis / eval / calc.py
1 import sys
2
3 if __name__ == '__main__':
4     input_file = open(sys.argv[1], 'r')
5
6     s = 0.0
7     c = 0
8     while True:
9         line = input_file.readline()
10         if line == '':
11             break
12
13         s += float(line)
14         c += 1
15
16     print "sum =", s
17     print "avg =", (s/c)