Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # slovo=input("Введите слово: ")
- slovo='ледяннее'
- mas_1=['а','у','о','ы','и','э','ю','е','ё','ю','я','ъ','ь']
- mas_2=['е','ё','ю','я']
- mas_3=['б','в','г','д','ж','з','к','л','м','н','п','р','с','т','ф','х','ц','ч','ш','щ','й']
- count=0
- for i in range(len(slovo)):
- if slovo[i] in mas_1 or slovo[i] in mas_3 or slovo[i] in mas_2:
- count += 1
- if slovo[i] in mas_2 and slovo[i-1] in mas_1:
- count += 1
- if slovo[i] in mas_3:
- if slovo[i] == slovo[i-1]:
- count -= 1
- print ("Количество букв: ",len(slovo))
- print ("Количество звуков: ",count)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement