boyan1324

23401

May 27th, 2024
715
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.90 KB | None | 0 0
  1. # 11
  2. text = input()
  3. text = text[:-4]
  4. print(f"{text.upper()}, {text.isalpha()}")
  5.  
  6. # 12
  7. text = input()
  8. count_n = text.lower().count('н')
  9. words = text.split()
  10. all_start_with_upper = True
  11. for i in words:
  12.     if not i[0].isupper():
  13.         all_start_with_upper = False
  14.         break
  15. print(f"н = {count_n}, {words}, {all_start_with_upper}")
  16.  
  17. # 13
  18. text = input()
  19. text = text.replace('е', 'и')
  20. text = text[::-1]
  21. count_i = text.lower().count('и')
  22. print(f"{text}, и = {count_i}")
  23.  
  24. # 14
  25. text = input().split()
  26. joined_text = "_".join(text)
  27. print(f"{joined_text}, {joined_text.islower()}")
  28.  
  29. # 15
  30. text = input()
  31. text = text.lower()
  32. print(f"{text}, o = {text.lower().count('о')}, {text.isalpha()}")
  33.  
  34. # 16
  35. text = input()
  36. text = text[::-1]
  37. text = text.replace('а', 'у')
  38. print(f"{text}, {text.startswith('у')}")
  39.  
  40. # 17
  41. text = input()
  42. text = text[3:]
  43. text = text.lower()
  44. count_i = text.lower().count('и')
  45. print(f"{text}, и = {count_i}")
  46.  
  47. # 18
  48. text = input()
  49. count_i = text.lower().count('и')
  50. print(f"{":".join(text.split())}, и = {count_i}")
  51.  
  52. # 19
  53. text = input()
  54. text = text.upper()
  55. words = text.split()
  56. all_end_with_O = True
  57. for word in words:
  58.     if not word.endswith('О'):
  59.         all_end_with_O = False
  60.         break
  61. print(f"{text}, {words}, {all_end_with_O}")
  62.  
  63. # 20
  64. text = input()
  65. text = text[:-3]
  66. text = text[::-1]
  67. print(f"{text}, {text.isnumeric()}")
  68.  
  69. # 21
  70. text = input()
  71. text = text.replace('т', 'д')
  72. count_d = text.lower().count('д')
  73. print(f"{text}, д = {count_d}, {text.islower()}")
  74.  
  75. # 22
  76. text = input()
  77. text = text.lower()
  78. words = text.split()
  79. all_start_with_a = True
  80. for word in words:
  81.     if not word.startswith('a'):
  82.         all_start_with_a = False
  83.         break
  84. print(f"{text}, {words}, {all_start_with_a}")
  85.  
  86. # 23
  87. text = input()
  88. count_v = text.lower().count('в')
  89. text = text.upper()
  90. print(f"{text},в = {count_v}, {text.endswith('А')}")
  91.  
  92. # 24
  93. text = input()
  94. count_b = text.lower().count('б')
  95. print(f"{"/".join(text.split())}, б = {count_b}")
  96.  
  97. #25
  98. text = input()
  99. text = text[::-1]
  100. text = text.lower()
  101. count_a = text.lower().count('а')
  102. print(f"{text}, a = {count_a}")
  103.  
  104. #26
  105. text = input()
  106. text = text.replace('е', 'а')
  107. print('-'.join(text.split()))
  108.  
  109. #27
  110. text = input()
  111. text = text.upper()
  112. text = text[2:]
  113. print(f"{text}, {text.isalpha()}")
  114.  
  115. #28
  116. text = input()
  117. count_i = text.lower().count('и')
  118. text = text[::-1]
  119. print(f"{text}, и = {count_i}, {text.startswith('а')}")
  120.  
  121. #29
  122. text = input()
  123. text = ".".join(text.split())
  124. count_e = text.lower().count('е')
  125. print(f"{text}, e = {count_e}")
  126.  
  127. #30
  128. text = input()
  129. text = text[:-2]
  130. text = text.lower()
  131. print(f"{text}, {text.isnumeric()}")
  132.  
  133. #31
  134. text = input()
  135. text = text.lower().replace('и', 'е')
  136. text = text[::-1]
  137. print(f"{text}, {text.endswith('а')}")
  138.  
  139. #32
  140. text = input()
  141. text = text.lower()
  142. count_o = text.count('о')
  143. print(f"{text}, o = {count_o}, {text.startswith('н')}")
  144.  
  145. #33
  146. text = input()
  147. count_i = text.lower().count('и')
  148. print(f"{','.join(text.split())}, и = {count_i}")
  149.  
  150. #34
  151. text = input()
  152. text = text[::-1]
  153. text = text.replace('о', 'у')
  154. print(f"{text}, {text.isalpha()}")
  155.  
  156. #35
  157. text = input()
  158. words = text.split()
  159. count_a = 0
  160. for i in words:
  161.     if 'а' in i:
  162.         count_a += 1
  163. print(f"{"/".join(words)}, a = {count_a}")
  164.  
  165. #36
  166. text = input()
  167. text = text.upper()
  168. count_u = text.lower().count('у')
  169. print(f"{text}, у = {count_u}, {text.endswith('Н')}")
  170.  
  171. #37
  172. text = input()
  173. text = text[3:]
  174. print(f"{'-'.join(text.split())}")
  175.  
  176. #38
  177. text = input()
  178. text = text.lower().replace('к', 'т')
  179. text = text[::-1]
  180. print(f"{text}, {text.startswith('т')}")
  181.  
  182. #39
  183. text = input()
  184. count_e = text.lower().count('е')
  185. text = text.lower()
  186. print(f"{text}, e = {count_e}, {text.isalpha()}")
  187.  
  188. #40
  189. text = input()
  190. words = text.split()
  191. count_v = 0
  192. for i in words:
  193.     if 'в' in i.lower():
  194.         count_v += 1
  195. print(f"{'-'.join(words)}, в = {count_v}")
Advertisement
Add Comment
Please, Sign In to add comment