aboutsummaryrefslogtreecommitdiff
path: root/challenge-279/eric-cheung/python/ch-2.py
diff options
context:
space:
mode:
authorMohammad Sajid Anwar <mohammad.anwar@yahoo.com>2024-07-22 09:41:47 +0100
committerMohammad Sajid Anwar <mohammad.anwar@yahoo.com>2024-07-22 09:41:47 +0100
commit7aff3f0a8f31701a7c8927fcbc41a9a194e4a157 (patch)
treefcd7af15ba80eb99819cdd39bc8f73e3b7fbf28c /challenge-279/eric-cheung/python/ch-2.py
parent7a9ced4c8f5de3ab26a70e02883be0c457275a9c (diff)
downloadperlweeklychallenge-club-7aff3f0a8f31701a7c8927fcbc41a9a194e4a157.tar.gz
perlweeklychallenge-club-7aff3f0a8f31701a7c8927fcbc41a9a194e4a157.tar.bz2
perlweeklychallenge-club-7aff3f0a8f31701a7c8927fcbc41a9a194e4a157.zip
- Added solutions by Eric Cheung.
Diffstat (limited to 'challenge-279/eric-cheung/python/ch-2.py')
-rwxr-xr-xchallenge-279/eric-cheung/python/ch-2.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/challenge-279/eric-cheung/python/ch-2.py b/challenge-279/eric-cheung/python/ch-2.py
new file mode 100755
index 0000000000..c413351d9a
--- /dev/null
+++ b/challenge-279/eric-cheung/python/ch-2.py
@@ -0,0 +1,10 @@
+
+## strInput = "perl" ## Example 1
+## strInput = "book" ## Example 2
+strInput = "good morning" ## Example 3
+
+arrVowel = ["a", "e", "i", "o", "u"]
+
+arrVowelCount = [charLoop for charLoop in strInput if charLoop in arrVowel]
+
+print (len(arrVowelCount) % 2 == 0)