+ 2

I'm not getting all test cases passed in the Average Word Length problem (in code coach). I'm dropping my code here.

from math import ceil a = input().split() b = [len(i) for i in a] print(ceil(sum(b)/len(a))) Can anyone help me in this

16th Feb 2025, 6:42 AM
Naksh Joseph
2 Answers
+ 8
The instruction states: "Remove all punctuation."
16th Feb 2025, 7:44 AM
Lisa
Lisa - avatar
+ 1
I think you forgot to remove question marks from the input. At least one of the inputs contains a question mark that has to be removed.
16th Feb 2025, 3:56 PM
Jan
Jan - avatar