0

Average Word Length Challenge

I dunno why two case fail https://www.sololearn.com/coach/73?ref=app text = input() txt = text.split() text = ''.join(txt) average = len(text)/len(txt) print(round(average))

22nd Jun 2021, 1:50 PM
Nwalozie Elijah
Nwalozie Elijah - avatar
2 Answers
+ 3
Elijah Nwalozie You have to count only character a to z because string may contains other characters too average = len(txt_a_z) / len(txt) for rounded upto nearest whole number use math.ceil print (math.ceil(average))
22nd Jun 2021, 1:54 PM
A͢J
A͢J - avatar
+ 2
Thanks I'll do that now
22nd Jun 2021, 1:54 PM
Nwalozie Elijah
Nwalozie Elijah - avatar