aboutsummaryrefslogtreecommitdiff
path: root/challenge-279/deadmarshal/python/ch2.py
diff options
context:
space:
mode:
authorMohammad Sajid Anwar <Mohammad.Anwar@yahoo.com>2024-07-22 14:15:59 +0100
committerGitHub <noreply@github.com>2024-07-22 14:15:59 +0100
commit3034159ed54422350fda276e93b1d32ebd04c4bd (patch)
tree78cb91431674611a318cbf2827e0f5155b363705 /challenge-279/deadmarshal/python/ch2.py
parent7cc71a882e416db99d281ec66b276be1d0acc481 (diff)
parent3d98389c58cdfc69f2a43ea6f6bf69875acb6697 (diff)
downloadperlweeklychallenge-club-3034159ed54422350fda276e93b1d32ebd04c4bd.tar.gz
perlweeklychallenge-club-3034159ed54422350fda276e93b1d32ebd04c4bd.tar.bz2
perlweeklychallenge-club-3034159ed54422350fda276e93b1d32ebd04c4bd.zip
Merge pull request #10478 from deadmarshal/TWC279
Twc279
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'))
+