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)
Ответ дал: Гость
#include < stdio.h> #include < stdlib.h> #include < conio.h> #include < math.h> int main(){ int x, y; printf("\n vvedite x and y: "); scanf("%d" "%d", & x, & y); if (x < y) printf("\n x = %d, y = %d", (x + y)/2, 2 * x * y); else printf("\n x = %d, y = %d", 2 * x * y, (x + y)/2); printf("\n\n to "); getch( ); return 0; }
Популярные вопросы