aboutsummaryrefslogtreecommitdiff
path: root/challenge-145/abigail/python/ch-1.py
diff options
context:
space:
mode:
authorMohammad S Anwar <Mohammad.Anwar@yahoo.com>2021-12-29 19:25:59 +0000
committerGitHub <noreply@github.com>2021-12-29 19:25:59 +0000
commit391618c86bc7b3f8e1243ae7e26ee996a240d6b2 (patch)
treebefbe8f797b911942c575d62674c51a8e1a2f291 /challenge-145/abigail/python/ch-1.py
parent58223a8102e2541f830e1208a0cc1daf6024331e (diff)
parenta7cfe19e7988033b8b37d4effedcf01ee203ff0e (diff)
downloadperlweeklychallenge-club-391618c86bc7b3f8e1243ae7e26ee996a240d6b2.tar.gz
perlweeklychallenge-club-391618c86bc7b3f8e1243ae7e26ee996a240d6b2.tar.bz2
perlweeklychallenge-club-391618c86bc7b3f8e1243ae7e26ee996a240d6b2.zip
Merge pull request #5442 from Abigail/abigail/week-145
Week 145
Diffstat (limited to 'challenge-145/abigail/python/ch-1.py')
-rw-r--r--challenge-145/abigail/python/ch-1.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/challenge-145/abigail/python/ch-1.py b/challenge-145/abigail/python/ch-1.py
new file mode 100644
index 0000000000..43913ceb0e
--- /dev/null
+++ b/challenge-145/abigail/python/ch-1.py
@@ -0,0 +1,18 @@
+#!/opt/local/bin/python
+
+#
+# See ../README.md
+#
+
+#
+# Run as: python ch-1.py < input-file
+#
+
+a = [int (x) for x in input () . split (" ")]
+b = [int (x) for x in input () . split (" ")]
+
+sum = 0
+for i in range (len (a)):
+ sum = sum + a [i] * b [i]
+
+print (sum)