def countvowel(string): countvowel = 0; for i in string: if i == 'а' or i == 'е' or i == 'ё' or i == 'и' or i == 'о' or i == 'у' or i == 'ы' or i == 'э' or i == 'ю' or i == 'я': countvowel+=1 return countvowel lst = ['кошка','кофе','телевизор','автомобиль']rang = range(len(lst))for i in rang: lst[i] = countvowel(lst[i])print(lst)
Ответ дал: Гость
uses crt; var n,i: integer; a: array[1..1000] of integer; beginread(n); for i: =1 to n do read(a[i]); for i: =1 to n do beginif a[i]< 0 then a[i]: =abs(a[i]); for i: =1 to n do write(a[i],' '); end.
Популярные вопросы