Question: Question 2: Playing with Sets (2 points) Write a function uniqueWords (t) which when given a string (with no punctuation) will return a set containing

 Question 2: Playing with Sets (2 points) Write a function uniqueWords

Question 2: Playing with Sets (2 points) Write a function uniqueWords (t) which when given a string (with no punctuation) will return a set containing the unique words in the string. Capitalizations should be ignored. For example: Hello = hello In [ ]: #Your Code Here In [ ]: print ("Are my sample test cases correct?") print("#1", len(uniqueSet("Born too late to have invented the internet")) == 8) test2 = uniqueSet ("Born too early to have entered the") test2.add("matrix") print("#2", len(test2) == 8) test3 = uniqueSet("Born right on time") test3. update (["to", "browse", "Dank", "Memes"]) print("#3", len(test3) == 8)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!