aboutsummaryrefslogtreecommitdiff
path: root/challenge-047/orestis-zekai/python/ch-2.py
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-047/orestis-zekai/python/ch-2.py')
-rw-r--r--challenge-047/orestis-zekai/python/ch-2.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/challenge-047/orestis-zekai/python/ch-2.py b/challenge-047/orestis-zekai/python/ch-2.py
new file mode 100644
index 0000000000..b2e745ac96
--- /dev/null
+++ b/challenge-047/orestis-zekai/python/ch-2.py
@@ -0,0 +1,13 @@
+gapfulNumbers = 0
+currentNum = 100
+numbers = []
+
+while (gapfulNumbers < 20):
+ divisor = int(str(currentNum)[0] + str(currentNum)[-1])
+ if (currentNum % divisor == 0):
+ gapfulNumbers += 1
+ numbers.append(currentNum)
+
+ currentNum += 1
+
+print(numbers) \ No newline at end of file