add code v2
This commit is contained in:
parent
8e64668924
commit
3dc1a9d708
12
maingit.py
12
maingit.py
@ -1,19 +1,15 @@
|
|||||||
def count_vowels(s: str) -> int:
|
def count_vowels(s: str) -> int:
|
||||||
count = 0
|
count = 0
|
||||||
for ch in range(len(s)):
|
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] == "а"):
|
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
|
count += 1
|
||||||
#print(s[ch])
|
# print(s[ch])
|
||||||
print(count)
|
return count
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
print(count_vowels("Привет мир"))
|
print(count_vowels("Привет мир"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__": main()
|
if __name__ == "__main__": main()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user