As a final part to the in class assignments, we will obtain some statistics from the file data.txt, that you used in the IN CLASS ASSIGNMENT 2.


We wish to calculate the average length of words in the file, and the average length of sentences in the file. To do this, you can add code to the function that reads in data.txt word by word.  Count the words and sentences, obtain sentence and word lengths and print out the averages.