Define and implement a function named getAuthors. This function will have one parameter of type list[Book] and output a value of type list[str]. This function will create and populate a list of author names corresponding to each Book object in the input list.
You must implement this function using a for loop.