aboutsummaryrefslogtreecommitdiff
path: root/challenge-001/abigail/python/ch-2.py
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-001/abigail/python/ch-2.py')
-rw-r--r--challenge-001/abigail/python/ch-2.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/challenge-001/abigail/python/ch-2.py b/challenge-001/abigail/python/ch-2.py
new file mode 100644
index 0000000000..9e93cb08e2
--- /dev/null
+++ b/challenge-001/abigail/python/ch-2.py
@@ -0,0 +1,16 @@
+#
+# See ../READ.md
+#
+
+#
+# Run as python ch-2.py < input-file
+#
+
+import fileinput
+
+for max in fileinput . input ():
+ for i in range (1, int (max) + 1):
+ print "fizzbuzz" if i % 15 == 0 else\
+ "buzz" if i % 5 == 0 else\
+ "fizz" if i % 3 == 0 else\
+ i