Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The library at the Hogwarts School of Witchcraft and Wizardry has computerized its book issuing process. The relevant information is provided as text from standard

The library at the Hogwarts School of Witchcraft and Wizardry has computerized its book issuing process. The relevant information is provided as text from standard input in three parts: information about books, information about borrowers and information about checkouts. Each part has a specific line format, described below.

Information about books Line format: Accession Number~Title

Information about borrowers Line format: Username~Full Name

Information about checkouts Line format: Username~AccessionNumber~Due Date Note: Due Date is in YYYY-MM-DD format.

You may assume that the data is internally consistent. For every checkout, there is a corresponding username and accession number in the input data, and no book is simultaneously checked out by two people. Each section of the input starts with a line containing a single keyword. The first section begins with a line containing Books. The second section begins with a line containing Borrowers. The third section begins with a line containing Checkouts. The end of the input is marked by a line containing EndOfInput. Write a Python program to read the data as described above and print out details about books that have been checked out. Each line should describe to one currently issued book in the following format: Due Date~FullName~AccessionNumber~Title Your output should be sorted in increasing order of due date. For books due on the same date, sort in increasing order of full name.

Step by Step Solution

3.48 Rating (151 Votes )

There are 3 Steps involved in it

Step: 1

def borrowersinputb xinputwhile xCheckouts xxsplitbappendx xinputdefchec... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Elementary Statistics Using Excel

Authors: Mario F. Triola

6th Edition

134506623, 134506626, 9780134508979, 978-0134506623

More Books

Students also viewed these Programming questions

Question

explain why both internal and external recovery are important;

Answered: 1 week ago

Question

Given find the value of k. es 1 e kx dx = 1 4'

Answered: 1 week ago