1. Engineering
  2. Computer Science
  3. 2 write a function uniquewords0 that takes as a parameter...

Question: 2 write a function uniquewords0 that takes as a parameter...

Question details

2. Write a function uniqueWords0 that takes as a parameter a string representing the name of a text file. The function returns a set of all the unique words in the file. Make sure to remove all punctuation (i.e. all commas, question marks, periods, colons, and semicolons see str.maketrans) before determining whether any words are duplicated so that the punctuation wont interfere with the process. Capitalization should be ignored. The information below shows how you would call the function unique Words0 and what it would show for a couple of sample executions. This is what the output looks like when running against the samples files: with, latest,creacivity, exploration, green,innovativecan , #16, including , , electives, the, influenced . , .broad., able , , ,conte xtwork, take, chis depaul, awi1l, expected, cheychinkin g, animating, animation, technologies, creative, hand-drawn,ar, an, screen,nspiration, on, anked, students, program introduced , principles,motion, critical, courses,1iberallexible,learni ng, of production, arts, skills, emphasis, toin, are extre mely, and,then, is,degree,3d, other, within 2016creative ly, draw, interdisciplinary, experiment, foundation, stop, capture career,by,u,student,between, studios, ba, viewpoint,be studiesreview,subjects, control, intellectual, emphasizes,conne ctions, their, software, tools, self-directed, sequence, which, br ing) simple, ocest,doc, this, a, )

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution