Question: Could you use python 3 to solve theseThank you Question 1b: Unique Words (2 points) Write a python function unique_words which takes a string and

Could you use python 3 to solve theseThank you
 Could you use python 3 to solve theseThank you Question 1b:
Unique Words (2 points) Write a python function unique_words which takes a
string and returns a set which contains all of the words in

Question 1b: Unique Words (2 points) Write a python function unique_words which takes a string and returns a set which contains all of the words in the string. We ignore letter cases and punctuations (all letters should be converted to lower case and all punctuations are removed). For example,if the input string is "Wait, walt, vait, ny friend" then the function should return'wait,'myfriend') You should not copy the code that is already in format string into this function. Call the corresponding function instead. In [48]: def unique words(s): s-format string(s) return set(s.split)) # Your code here Pile "0 NaneErrors nane "unique words' is unique words ('ne 11 01 ~ halio . unique wordst Wait, wait, vait, my Erlendwasytriend defined not .mehe nur-'78 [ \\l."(I)-. result str for ch in s if (ch not in punctutions) : result str result str ch return result str.lover( # your code here Pile "xipython-input-55-tt7eia4d6725> ine for eh in s Indentationkrror unexpected indent Cm aneError cipython-input-56-aa2c87266432> in cnodule) Traceback (most recent call last) 1 format string Wait, vait, vait, my friendvait wait vait my friend Nanetrror; nane . format-string, is not defined In [57), format-string ("nello11 goodbye ,:#5"\0++.-./ices ?enir--n-) hello goodbye, e# NaneError Traceback (nost recest call last)

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!