0

Помогите решить задачу по курсу Python подсчет средней длины слов. Никак не проходит тест у меня.

4th Feb 2022, 6:35 PM
Helen
Helen - avatar
6 Réponses
+ 3
text = input() p = len((text.split())) def o (a): b = 0 for i in a.split(): b+= len(i) return b print(o(text)/p)
16th Aug 2022, 7:42 PM
Z Ip
+ 2
text = input() f=text.split() u=len(f) a = sum(len(i) for i in f) print(a/u)
4th Feb 2022, 10:08 PM
Yulia
+ 1
Покажите попытку.
4th Feb 2022, 7:44 PM
JaScript
JaScript - avatar
0
text = input() f=(text.split()) u=len(f) for i in f: avg=sum(len(i))/u i+=1 print(avg)
4th Feb 2022, 8:19 PM
Helen
Helen - avatar
0
Спасибо большое!😊
5th Feb 2022, 8:22 AM
Helen
Helen - avatar
0
text = input() split = text.split() words_amount = len(split) del_spaces = text.replace(" ", "") letters_amount = len(del_spaces) print (letters_amount / words_amount )
9th Aug 2022, 1:47 PM
Egor Vorfolomeew
Egor Vorfolomeew - avatar