summary refs log tree commit diff stats
path: root/python/raindrops/raindrops.py
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2021-08-11 15:26:15 +0530
committerAndinus <andinus@nand.sh>2021-08-11 15:26:15 +0530
commit321825828ac918bad28d0597a8616c6dc9802c3c (patch)
tree0b8e9cb1012197750eb58e972736319b2a6abac2 /python/raindrops/raindrops.py
parent2979ef790ac5b8f58495e0dd08cafd6a3a2e30a5 (diff)
downloadexercism-321825828ac918bad28d0597a8616c6dc9802c3c.tar.gz
Add solved exercises
Diffstat (limited to 'python/raindrops/raindrops.py')
-rw-r--r--python/raindrops/raindrops.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/python/raindrops/raindrops.py b/python/raindrops/raindrops.py
new file mode 100644
index 0000000..f1cee2e
--- /dev/null
+++ b/python/raindrops/raindrops.py
@@ -0,0 +1,11 @@
+def convert(number):
+    result = ""
+    if number % 3 == 0:
+        result += "Pling"
+    if number % 5 == 0:
+        result += "Plang"
+    if number % 7 == 0:
+        result += "Plong"
+    if len(result) == 0:
+        result = str(number)
+    return result