Python 3, Basic Questions for building a library program (Beginner!) -


for school i'm in process of writing program acts kind of library of sorts, can add books library lend books, return books, search books , forth. @ moment i'm starting see light in end of tunnel , (atleast thought..) i'm getting ready wrap up.

but i'm thinking don't have way deal if add 2 books same title same author.. if 2 books same title different authors it's no problem, if they're same author got problem.. how "lend book" function working if there's title occurs more once in dictionary i've stored choose book lend name of author, , loops through these authors "if any(blablabla...)"-clausule, since loops through them 1 one ends first instance of book, if understand mean.. , if that's loaned program says "sorry, book loaned" , returns main menu.

is there clever way through this? right i'm reading in books , authors textfile , then, in every function, put them in dictionary titles keys , authors value key (in list, if there's more 1 of title list holds authors). maybe there's smarter way well? i'm beginning learn classes, maybe can solve classes somehow?

anyhoooow, main question how work through "several identical books same identical author" dilemma.. grateful ever :-)

unless need other specific information distinct copies of given book/author, have count each, indicating how many copies have. if do have other information distinguishing copies, can use info tell them apart.


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -