Question: Programming language - python c. read_files() Write code for read_files() which takes a list of filenames, building and returning a names dict of all their

 Programming language - python c. read_files() Write code for read_files() which
takes a list of filenames, building and returning a names dict of
Programming language - python

c. read_files() Write code for read_files() which takes a list of filenames, building and returning a names dict of all their data. This function is called by main() to build up the names dict from all the files mentioned on the command line. No tests are required this short function. d. search_names() Write code for search_names() which searches for a target string and returns a sorted list of all the name strings that match the target (no year or rank data). In this case, the target matches a name, not-case sensitive, if the target appears anywhere in the name. For example the target strings 'aa' and 'AA' both match 'Aaliyah' and 'Ayaan'. Return the empty list if no names match the target string. This function is called by main() for the - search command line argument. Write at least 3 Doctests for search_names() which is the most algorithmic. You can make up a tiny names dict just for the tests. def read_files(filenames.): Given list of filenames, build and return a names dict of all their data. pass edef search_names(names, target): Given names dict and a target string, return a sorted list of all the name strings that contain that target string anywhere. Not case sensitive. (Code and tests TBD) pass

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!