aboutsummaryrefslogtreecommitdiff
path: root/challenge-117/abigail/python/ch-1.py
diff options
context:
space:
mode:
authorAbigail <abigail@abigail.be>2021-06-14 14:31:49 +0200
committerAbigail <abigail@abigail.be>2021-06-14 18:42:01 +0200
commit9ec85fb512199039e4c6e9a79ecc13425d3175a9 (patch)
tree902ac88a4b1deefb309202899009d1132644950c /challenge-117/abigail/python/ch-1.py
parent3eb168656ab30ce0eaa86db8e668ceab145a57f8 (diff)
downloadperlweeklychallenge-club-9ec85fb512199039e4c6e9a79ecc13425d3175a9.tar.gz
perlweeklychallenge-club-9ec85fb512199039e4c6e9a79ecc13425d3175a9.tar.bz2
perlweeklychallenge-club-9ec85fb512199039e4c6e9a79ecc13425d3175a9.zip
AWK, Bash, C, Lua, Node.js, Perl, Python, Ruby solutions for week 117, part 1
Diffstat (limited to 'challenge-117/abigail/python/ch-1.py')
-rw-r--r--challenge-117/abigail/python/ch-1.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/challenge-117/abigail/python/ch-1.py b/challenge-117/abigail/python/ch-1.py
new file mode 100644
index 0000000000..6b6da28640
--- /dev/null
+++ b/challenge-117/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
+
+sum = 0
+SUM_15 = 120
+
+for line in fileinput . input ():
+ sum = sum + int ((line . split (",")) [0])
+
+print (SUM_15 - sum)