PLEASE READ THIS QUESTION TILL THE END AND USE DOCSTRING METHOD TO…

Question Answered step-by-step PLEASE READ THIS QUESTION TILL THE END AND USE DOCSTRING METHOD TO… PLEASE READ THIS QUESTION TILL THE END AND USE DOCSTRING METHOD TO SOLVE THIS PROBLEM.excerpt = “””Suddenly she came upon a little three-legged table, all made of solidglass; there was nothing on it except a tiny golden key, and Alice’sfirst thought was that it might belong to one of the doors of the hall;but, alas! either the locks were too large, or the key was too small,but at any rate it would not open any of them. However, on the secondtime round, she came upon a low curtain she had not noticed before, andbehind it was a little door about fifteen inches high: she tried thelittle golden key in the lock, and to her great delight it fitted!Alice opened the door and found that it led into a small passage, notmuch larger than a rat-hole: she knelt down and looked along thepassage into the loveliest garden you ever saw. How she longed to getout of that dark hall, and wander about among those beds of brightflowers and those cool fountains, but she could not even get her headthrough the doorway; “and even if my head would go through,” thoughtpoor Alice, “it would be of very little use without my shoulders. Oh,how I wish I could shut up like a telescope! I think I could, if I onlyknew how to begin.” For, you see, so many out-of-the-way things hadhappened lately, that Alice had begun to think that very few thingsindeed were really impossible.There seemed to be no use in waiting by the little door, so she wentback to the table, half hoping she might find another key on it, or atany rate a book of rules for shutting people up like telescopes: thistime she found a little bottle on it, (“which certainly was not herebefore,” said Alice,) and round the neck of the bottle was a paperlabel, with the words “DRINK ME,” beautifully printed on it in largeletters.”””You need to write two functions:Function 1 accepts any text (string) and returns a cleaned up all lower cased text (i.e., removes all punctuation, numbers, non-ASCII letters etc.)Function 2 accepts cleaned text and an empty dictionary. The dictionary is populated with word-frequency information where the ‘keys’ are words and ‘values’ are the count of those keys.Test both of your function using the string excerpt provided above. Computer Science Engineering & Technology Python Programming CSCA 2000 Share QuestionEmailCopy link Comments (0)