10 pts
Description:
To start, create a new Jupyter Notebook file called “Assignment 1” or use the “Assignment 1.ipynb” file included in Week 3. The file on D2L includes descriptions and suggestions on how to implement the different steps of the assignment.
Using the concepts you’ve learned so far, we will read through the contents of the assignment1.txt file and create a new file that lists out each word in the file and the number of times that word is used. To do so, follow these steps:
- Download the “assignment1.txt” file available on D2L.
- Read the contents of the assignment1.txt file
- Split the results on spaces to get a List of each word
- Loop through the List and populate a Set to track unique words and a Tuple to track the word count
- Loop through the Set of unique words and create a Dictionary that stores the word and how many times it shows up
- Loop through the Dictionary to create a String for the final output that includes the word and how often it showed up (include line breaks between each word count)
- Write a new file that includes the final output String
When completed, use the Assignment 1 submission folder to upload your .ipynb file