diff --git a/Python-Vowels b/Python-Vowels new file mode 100644 index 000000000000..3f15b51b6c2e --- /dev/null +++ b/Python-Vowels @@ -0,0 +1,12 @@ +def count_vowels(text: str) -> int: + if not isinstance(text, str): + return 0 + + vowels = "aeiouAEIOU" + count = 0 + + for ch in text: + if ch in vowels: + count += 1 + + return count