+ 1

Average word length challenge

https://sololearn.com/coach/73/?ref=app https://code.sololearn.com/cAPABTwzS1x2/?ref=app Some test cases are fine but some are not. Also I used “math.ceil()”, but I couldn’t pass all tests either. Please tell me what’s wrong it.

28th Mar 2023, 11:15 PM
Nat
Nat - avatar
2 Answers
+ 2
Read the problem again. "Takes in a string, figure out the average length of all the words and return a number representing the average length. Remove all punctuation. Round up to the nearest whole number." you are not removing punctuations. the len of what? should be 4 if you remove the punctuation Also, it is round up. Not just round.
28th Mar 2023, 11:41 PM
Bob_Li
Bob_Li - avatar
0
Maybe you missed something
29th Mar 2023, 4:26 AM
Vaibhavi