+ 4
Sorry, we should not share a complete code from code coach. What i have done for you is a sample how to remove all punctuations. I think the rest of your code is ok. from string import punctuation sentence = "!&)this phrase has multiple words..." # this could be an input print(sentence) # for test only for i in punctuation: # this for loop will remove all punctuations from the string sentence = sentence.replace(i,'') print(sentence) # for test only # continue with oyur code here...
21st Apr 2020, 7:01 PM
Lothar
Lothar - avatar
+ 5
With the phrase from the task description the result will be 5.2 letters in average. If you now use round() you get a result of 5. But the task description says, the result should be ROUNDED UP to the nearest whole number. So you have to use a ceil() rounding...
21st Apr 2020, 5:50 PM
Lothar
Lothar - avatar
+ 4
If first test is not passing, it should show you the result from your code and the expected code.
21st Apr 2020, 5:58 PM
Lothar
Lothar - avatar
+ 4
There is an other hint in the task description that says, that all punctuation has to be removed from the string. to check agianst punctuation you can import string.punctuation
21st Apr 2020, 6:03 PM
Lothar
Lothar - avatar
+ 3
May be you can show us the official task description, so that we can get a clear view on it? Thanks.
21st Apr 2020, 2:32 PM
Lothar
Lothar - avatar