P2 Task 2: Unit Testing Using Modules In the previous task, each team member has implemented two functionalities add/rem
Posted: Mon Mar 21, 2022 4:41 pm
import string from typing import List def get_books_by_publisher ( file_name : str, publisher_name : str) -> int: OVOU AWNA 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 infile = open(file_name, 'r') file_name = OL publisher_nameb = list(publisher_name) publisher_title_list = [] publisher_author_list = [] publishers_books = 0 j = 1 for i in infile: i = i.split(",") if i[3] == publisher_name: publisher_title_list.append(i[@]) publisher_author_dict.append(i[1]) publishers_books = publisher_books + 1 else: print('no books published by that publisher are in this book library') print('the publisher', publisher_name, ' has published the following books:') for x in range(len(publisher_title_list)): print('book', X+1, , publisher_title_list[x], by", publisher_author_list[x], "") return publisher_books 11 1