Short Story By Path Using Python

Part 1

Your program should start by asking the user to name a short story by path on the (Links to an external site.) website. For example, if the user enters 'aos' then the program will access the website (Links to an external site.) . If the user enters an invalid short story (path, such as 'aps'--note the typo), the program will say "Short story not found" and quit. (Hint: try-except) If a story is found, state that the story was found and how many vocabulary terms there are.

Part 2

The program will store the vocabulary words in such a way that the user can optionally update the word's definition. Eliminate duplicates. By default, the definition should be an empty string (''). It will ask the user if he/she would like to update any definitions. If the user enters 'Y' (for yes), then program will ask for the term and definition. Afterwards, the program will ask the user if he/she would like to update additional definitions. If the user answers 'Y' again, then the program will repeat this step until the user enters 'N' (for no). Note, for words that already have definitions, the program MUST warn the user and state what the current definition is. For words not in the vocabulary list, the program will simply state that the word was not found and ask if the user would like to update additional definitions until 'N' is encountered.

Part 3

As a final step, the program will ask the user for a file name to save the vocabulary words. The text must be saved using format() such that there are enough spaces for the longest vocabulary word, followed by a space, a dash, and a space before the definition. The vocabulary words should be left aligned. See below for an example.

Here is an example of what the program should look like to the user, with red as the user-input.

Here is an example of the corresponding output file: myvocab1.txt Note that even though there are many instances of 'bazaar' in Araby, it is only counted once in the unique vocabulary words list. Here is another example of the program:

Here is another example of the program:

Here is an example of a short story with no vocabulary words:

Here is an example of a short story that could not be located:


  • All vocabulary words are associated with a hyperlink. Use the hyperlink to extract the vocabulary work when you first go through the original

  • (Links to an external site.)

  • page.

  • Not all key terms refer to For example, "Hongkong" in Beyond the Wall

  • (Links to an external site.)

  • links to a Wikipedia page. It does not need to be added to our vocabulary list.



Contact Us at: to get instant help with an affordable price

34 views0 comments