This commit is contained in:
2025-12-11 18:01:56 +05:00
commit bfa7413f9c
38 changed files with 651 additions and 0 deletions

18
task_18.py Normal file
View File

@@ -0,0 +1,18 @@
sentence = input("Введите предложение: ")
vowels = "аеёиоуыэюяАЕЁИОУЫЭЮЯ"
consonants = "бвгджзйклмнпрстфхцчшщБВГДЖЗЙКЛМНПРСТФХЦЧШЩ"
vowel_count = 0
consonant_count = 0
for char in sentence:
if char == ' ':
continue
if char in vowels:
vowel_count += 1
if char in consonants:
consonant_count += 1
print(f"Гласных букв: {vowel_count}")
print(f"Согласных букв: {consonant_count}")