diff options
| author | Mohammad Sajid Anwar <mohammad.anwar@yahoo.com> | 2024-07-22 09:41:47 +0100 |
|---|---|---|
| committer | Mohammad Sajid Anwar <mohammad.anwar@yahoo.com> | 2024-07-22 09:41:47 +0100 |
| commit | 7aff3f0a8f31701a7c8927fcbc41a9a194e4a157 (patch) | |
| tree | fcd7af15ba80eb99819cdd39bc8f73e3b7fbf28c /challenge-279/eric-cheung/python/ch-2.py | |
| parent | 7a9ced4c8f5de3ab26a70e02883be0c457275a9c (diff) | |
| download | perlweeklychallenge-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-x | challenge-279/eric-cheung/python/ch-2.py | 10 |
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)
|
