Terminal Exercises
Help 23 / 25
Finding Things

Little women

Go to the folder exercise-data/writing/:

cd $TUTORIAL/exercise-data/writing/

You and your friend, having just finished reading Little Women by Louisa May Alcott, are in an argument. Of the four sisters in the book, Jo, Meg, Beth, and Amy, your friend thinks that Jo was the most mentioned. You, however, are certain it was Amy. Luckily, you have a file LittleWomen.txt containing the full text of the novel (exercise-data/writing/LittleWomen.txt). Using a for loop, how would you tabulate the number of times each of the four sisters is mentioned?

The file stats.txt should match the following format:

Jo: 111
Meg: 222
Beth: 333
Amy: 444
Exercise Criteria:
0 / 2
  • File stats.txt exists
  • The file stats.txt contains how often each name was mentioned
Hints:
Showing 0/1 hints
  • [Hint hidden]
Loading...