Skip to content

Commit

Permalink
Update lab07.md
Browse files Browse the repository at this point in the history
  • Loading branch information
radhakumaran authored Feb 26, 2020
1 parent a263d55 commit 78e041a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions _lab/lab07.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ def getCleanWordList(filepath, charsToRemove):
`getUniqueWords` reads a file with given filepath and returns a list of all unique words that appeared in the file.

For example,
`getUniqueWords("input1.txt")` returns either `["hello", "world"]` or `["world", "hello"]`;
`getUniqueWords("input2.txt")` returns either `["hello", "world"]` or `["world", "hello"]`.
`getUniqueWords("input1.txt", ",.!?;")` returns either `["hello", "world"]` or `["world", "hello"]`;
`getUniqueWords("input2.txt", ",.!?;")` returns either `["hello", "world"]` or `["world", "hello"]`.

Hint: you need to call `getCleanWordList` first.

Expand All @@ -146,8 +146,8 @@ def getUniqueWords(filepath, charsToRemove):
`getWordCount` reads a file with given filepath and returns a list of lists, where **each element is a list** of two elements in the format `[word, count]`.

For example,
`getWordCount("input1.txt")` returns either `[["hello", 3], ["world", 1]]` or `[["world", 1], ["hello", 3]]`;
`getWordCount("input2.txt")` returns either `[["hello", 1], ["world", 3]]` or `[["world", 3], ["hello", 1]]`.
`getWordCount("input1.txt", ",.!?;")` returns either `[["hello", 3], ["world", 1]]` or `[["world", 1], ["hello", 3]]`;
`getWordCount("input2.txt", ",.!?;")` returns either `[["hello", 1], ["world", 3]]` or `[["world", 3], ["hello", 1]]`.

Hint: you need to call `getCleanWordList` and `getUniqueWords` in this function.

Expand Down

0 comments on commit 78e041a

Please sign in to comment.