add code v2

This commit is contained in:
Роман Бортников 2026-04-25 12:05:17 +03:00
parent 8e64668924
commit 3dc1a9d708

View File

@ -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()