add average script
[ust.git] / tests / benchmark / average
1 #!/usr/bin/python
2
3 import sys
4
5 def main():
6 total = 0.0
7 n = 0.0
8 while 1:
9 line = sys.stdin.readline()
10 if not line:
11 break
12
13 val = float(line)
14 n = n+1.0
15 total = total+val
16
17 print total/n
18 main()
This page took 0.028889 seconds and 4 git commands to generate.