Advertisement
Olegos

Untitled

Dec 10th, 2020 (edited)
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. # slovo=input("Введите слово: ")
  2. slovo='ледяннее'
  3.  
  4. mas_1=['а','у','о','ы','и','э','ю','е','ё','ю','я','ъ','ь']
  5. mas_2=['е','ё','ю','я']
  6. mas_3=['б','в','г','д','ж','з','к','л','м','н','п','р','с','т','ф','х','ц','ч','ш','щ','й']
  7.  
  8. count=0
  9.  
  10. for i in range(len(slovo)):
  11.  
  12. if slovo[i] in mas_1 or slovo[i] in mas_3 or slovo[i] in mas_2:
  13. count += 1
  14.  
  15. if slovo[i] in mas_2 and slovo[i-1] in mas_1:
  16. count += 1
  17.  
  18. if slovo[i] in mas_3:
  19. if slovo[i] == slovo[i-1]:
  20. count -= 1
  21.  
  22. print ("Количество букв: ",len(slovo))
  23. print ("Количество звуков: ",count)
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement