phython
Modify the sentence-generator program created in part 1 so that it inputs its vocabulary from a set of text files at startup. The filenames are nouns.txt, verbs.txt, articles.txt, and prepositions.txt. ***
(Hint: Define a single new function, getWords. This function should expect a filename as an argument. The function should open an input file with this name, define a temporary list, read words from the file, and add them to the list. The function should then convert the list to a tuple and return this tuple. Call the function with an actual filename to initialize each of the four variables for the vocabulary.)
8 years ago 5
Answer(1)
Purchase the answer to view it
- getword.py
- README.txt
other Questions(10)
- Faith
- I need help with my finance homework.
- For Phd Isaac Newton only
- scenario-information assurance-
- Short essay on leasing or purchasing
- mgt1
- combination lock
- Dana La Fontsee opened Pro Window Washing Inc. on July 1, 2012. During July
- Augustine as it for wizard kim
- three questions mentioned in discription.