@@ -0,0 +1,51 @@
1+from functools import reduce
2+from operator import mul
4+from flask_babel import gettext
13+# required answerer function
14+# can return a list of results (any result type) for a given query
16+ parts = query.query.split()
22+ args = map(float, parts[1:])
34+ answer = sum(args)/len(args)
38+ answer = reduce(mul, args, 1)
43+ return [{'answer': unicode(answer)}]
46+# required answerer function
47+# returns information about the answerer
49+ return {'name': gettext('Statistics functions'),
50+ 'description': gettext('Compute {functions} of the arguments').format(functions='/'.join(keywords)),
51+ 'examples': ['avg 123 548 2.04 24.2']}