Question: Using python Question 3 For this question you need to work with text. Write a function that takes in a two text files: one is

Using pythonUsing python Question 3 For this question you need to work with

Question 3 For this question you need to work with text. Write a function that takes in a two text files: one is a book, another file has names in it. You need to determine the 3 most popular names in the book (from the given name list) To do this, implement two helper methods, name_count and make_tuple, that will assist you in finding the answer. def namecount (file, name): Function returns the number of names in ile that match the given name >>name count("little women.txt", "Jo" 1543 >name count("little women.txt","Meg") 685 >name_count("littlewomen.txt", "Troll") # YOUR CODE HERE # def make tuple (name, frea): Function returns a tuple of two inputs >>make tuple (5, 3) (S, 3) >>make tuple (2, 2) (2, 2) >>make_tuple('red', 5) ('red', 5) YOUR CODE HERE def three_most_common names (text, text_names): Function that takes in text (a boak) and text names (characters from the baok You must implement this function to find the three most common names in the book >>> three most common names ("little women.txt" "names.txt") Jo', 'MegAmy' # YOUR CODE HERE #

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!