Homework 4: Strings and Arrays
The puprose of this homework is to get additional practice with strings and lists, and working with them in Python. This is just a single small project.
Make sure to follow the [collaboration policy][collab] for all homework.
For Proficiency credit, your submissions must pass all the test cases on Gradescope.
For Mastery credit, your submission must pass all test cases, and also have:
- Useful, informative variable names
- Clear and consistent spacing/linebreaks
- At least one function that you have written that returns a value
You will be given an integer
n, followed by
n words, each on their own line. Your job is to read in the input, and then output:
- How many duplicate words there are
- What the duplicate words were, in alphabetical order
Here, a duplicate is any word repeated twice or more.
Importantly, words that are capitalized differently should be considered to be the same word and treated accordingly. The duplicate words should be output in alphabetical order.