0
Calculating average word length
text = input() sum = 0 for i in text : sum += 1 x = text.split () z = len (x) m = sum / z print (m) Please someone help debug this code for finding average word length
9 ответов
0
Check for the maximum value after you're converting it to the array.
0
Ismael Wesa the problem is that you're counting spaces and punctuation in sum.
0
Try this:
m= x/2
print(m)
Instead of:
m= sum/2
print (m)
0
Thanks
0
Thanks
0
Still not working
0
Take a look at the answers here:
https://www.sololearn.com/discuss/2901506/?ref=app
0
Aryan Yadav that's wrong. In several ways.
0
Ok