diff options
Diffstat (limited to 'challenge-122/abigail/python/ch-1.py')
| -rw-r--r-- | challenge-122/abigail/python/ch-1.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/challenge-122/abigail/python/ch-1.py b/challenge-122/abigail/python/ch-1.py new file mode 100644 index 0000000000..b2fdeea20c --- /dev/null +++ b/challenge-122/abigail/python/ch-1.py @@ -0,0 +1,19 @@ +#!/opt/local/bin/python + +# +# See ../README.md +# + +# +# Run as: python ch-1.py < input-file +# + +import fileinput + +s = 0 +c = 0 + +for n in fileinput . input (): + s = s + int (n) + c = c + 1 + print (s // c) |
