aboutsummaryrefslogtreecommitdiff
path: root/challenge-279/deadmarshal/python/ch2.py
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-279/deadmarshal/python/ch2.py')
-rw-r--r--challenge-279/deadmarshal/python/ch2.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/challenge-279/deadmarshal/python/ch2.py b/challenge-279/deadmarshal/python/ch2.py
new file mode 100644
index 0000000000..915438046e
--- /dev/null
+++ b/challenge-279/deadmarshal/python/ch2.py
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+
+def split_string(s):
+ vowels = 'aeiouAEIOU'
+ return sum(s.count(v) for v in vowels) % 2 == 0
+
+print(split_string('perl'))
+print(split_string('book'))
+print(split_string('good morning'))
+