diff options
author | Jacob <andqso@gmail.com> | 2013-07-28 09:54:54 +0100 |
---|---|---|
committer | Jacob <andqso@gmail.com> | 2013-07-28 09:54:54 +0100 |
commit | f343459d6198352964dbb6779f15c352fe2d5794 (patch) | |
tree | 07d50c9a8269e3892ccea8f5680b3e2bac984fce /filter.py |
init
Diffstat (limited to 'filter.py')
-rwxr-xr-x | filter.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/filter.py b/filter.py new file mode 100755 index 0000000..6ee4f3c --- /dev/null +++ b/filter.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python2 + +import sys + +while True: + lfrac = sys.stdin.readline() + if not lfrac: + break + monolingual = sys.stdin.readline() + ul_only = sys.stdin.readline() + + print lfrac, monolingual, ul_only, + + p = 0 + r = 0 + f = 0 + + for i in range(10): + lp = float(sys.stdin.readline().split()[1]) + lr = float(sys.stdin.readline().split()[1]) + lf = float(sys.stdin.readline().split()[1]) + + p += lp + r += lr + f += lf + + p /= 10 + r /= 10 + f /= 10 + + print 'p:', p + print 'r:', r + print 'f:', f |