0

Whad did i do wrong is rounding up to a smaller numer

Average Word Length You are in a college level English class, your professor wants you to write an essay, but you need to find out the average length of all the words you use. It is up to you to figure out how long each word is and to average it out. Task: 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. Input Format: A string containing multiple words. Output Format: A number representing the average length of each word, rounded up to the nearest whole number. Sample Input: this phrase has multiple words Sample Output: 6 https://code.sololearn.com/cTIbdvsq7MDY/?ref=app

31st Aug 2022, 10:43 PM
Costy Game
Costy Game - avatar
1 Antwort
+ 4
The rounding is not the problem, you forgot to remove punctuation characters as specified in the description.
31st Aug 2022, 11:54 PM
Shadow
Shadow - avatar