MCPcopy Create free account
hub / github.com/ActiveState/code / sum

Function sum

recipes/Python/363219_Use_Jython_to_time_Java_code/recipe-363219.py:17–19  ·  view source on GitHub ↗
(seq)

Source from the content-addressed store, hash-verified

15
16
17def sum(seq):
18 # no sum in Jython 2.1, we will use reduce
19 return reduce(lambda x,y:x+y,seq)
20
21def avg(seq):
22 return sum(seq)/len(seq)

Callers 8

avgFunction · 0.70
dbfwriterFunction · 0.50
measureMethod · 0.50
trainFunction · 0.50
msumFunction · 0.50
frsumFunction · 0.50
wrapperFunction · 0.50
summaryFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected