Question: Suppose you are building a system for tracking a library of books. Each book is a list of: book = [title, author, publication_date,publisher,isbn] For example,

Suppose you are building a system for tracking a library of books. Each book is a list of:

book = [title, author, publication_date,publisher,isbn]

For example, the text book for this course would be

pythonbook = ["Starting out with Python", "Tony Gaddis", 2021, "Pearson", "978-0-13-592903-2"]

(A) describe a python statement to print the publication year from thebooklist.

(B) describe a python function that receives two parameters: the first is a list formatted as above, the second is a year. Your function returnsTrueif the book was published in that year,Falseotherwise.

(C) Optional bonus: like the function you wrote for (B) but: it returns -1 if the book was published before the year, 0 if published the same year, 1 if published after the year.For example, if this function were called with (pythonbook,2016) it would return 1 because the book was published after 2016.

i am having problem with this question

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 Programming Questions!