Exercise 7

The code we wrote with parallel lists is looking at all the words in the alice.txt file. Using a Unix command line, we can get access to the number of words in the text. What is the number of words in alice.txt?

After having built our parallel lists, we can use the list that stores frequencies to check whether we counted the right number of words. Add this in your code. Use the list that stores frequencies to compute the total of words in alice.txt. Print this number. And check whether it is the same as the one you obtained with the Unix command.