Help with calculating average word length


Can anybody teach me how to calculate average word length for the following two projects please?

Date-a-scientist project:

Twitter classification project:

I’m not sure how to remove the punctuation from each word and how best to go about getting the average word length.

Thanks so much!

Maybe the thing you’re really missing is to identify what you’re missing to do that all on your own. Break things down into smaller problems, for example, given a character, can you tell whether that’s punctuation? If you do that many times (if you’re using words like many or repeat then you’d want a loop) then you have the ability to separate letters and non letters … and so on.

What’s stopping you? If you’re going to solve a problem then you need to start with identifying what the problem is.