Modify the sentence-generator program of Case Study so that it inputs its vocabulary from a set of text files at startup. The filenames are… | Cheap Nursing Papers

Modify the sentence-generator program of Case Study so that it inputs its vocabulary from a set of text files at startup. The filenames are…

Modify the sentence-generator program of Case Study 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.)

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now

Hi there! Click one of our representatives below and we will get back to you as soon as possible.

Chat with us on WhatsApp