WORK IN PROGRESS! - Download Hamlet.txt to your working folder.
- Open the document and observe that it includes the character names when they speak, such as "Ber.", "Fran.", and "Mar."
- Assignment 1:
- Write a program that detects these character names from the text file and compiles them into a list named "namesList".
Hint: each of these names is preceded by a blank line, is the only word on the line, and ends with a period. - Sort the list, delete any duplicates, and print the names to the screen one-at-a-time to ensure there are no errors.
- Assignment 2:
- Write a program that determines the average sentence length of this version of Hamlet, where the assumption is a sentence ends with either a period or an exclamation mark.
- Do not include items that are part of a footnote (designated as "[....]" in this file) or anything included within underscores ("_").
- See your instructor for the next step...
|
|