diff --git a/maingit.py b/maingit.py index ba3b655..32a1ac5 100644 --- a/maingit.py +++ b/maingit.py @@ -1,19 +1,15 @@ def count_vowels(s: str) -> int: - count = 0 - for ch in range(len(s)): - if(s[ch] == "а" or s[ch] == "е" or s[ch] == "и" or s[ch] == "ы" or s[ch] == "о" or s[ch] == "у" or s[ch] == "ю" or s[ch] == "я" or s[ch] == "э" or s[ch] == "а"): - count += 1 - #print(s[ch]) - print(count) - - - - + count = 0 + for ch in range(len(s)): + if (s[ch] == "а" or s[ch] == "е" or s[ch] == "и" or s[ch] == "ы" or s[ch] == "о" or s[ch] == "у" or s[ + ch] == "ю" or s[ch] == "я" or s[ch] == "э" or s[ch] == "а"): + count += 1 + # print(s[ch]) + return count def main(): print(count_vowels("Привет мир")) - if __name__ == "__main__": main()