From 7aff3f0a8f31701a7c8927fcbc41a9a194e4a157 Mon Sep 17 00:00:00 2001 From: Mohammad Sajid Anwar Date: Mon, 22 Jul 2024 09:41:47 +0100 Subject: - Added solutions by Eric Cheung. --- challenge-279/eric-cheung/python/ch-2.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 challenge-279/eric-cheung/python/ch-2.py (limited to 'challenge-279/eric-cheung/python/ch-2.py') 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) -- cgit