def registerMember(self, name, location, age, aadharId, Id): ''' Verifies the aadhar_id and checks if it already is used to create a member. Registers a member. ... Parameters ---------- name : str Name of the user location : str Resedential city of the User age: int Age of the User aadhar_id: str Address proof of the user Id : str Identity card of the student/employee Returns ------- A dictionary: With "Status" as key and Bool as value. ''' res = {"registration_status": True} if aadharId in self.members: res = { "registration_status": False, "message": f"{aadharId} is already a member" } return res self.members[aadharId] = Member(name, location, age, aadharId, Id) return res
lib.addBook('Thermodynamics', 'P.K. Nag', 'June 1989', '1279') lib.addBookItem('Thermodynamics', 'BTXPB5929C', 'T101') lib.addBookItem('Thermodynamics', 'BTXPB5929C', 'T102') lib.addBook('Machine Design', 'R.S. Khurmi', 'Februaru 1990', '2087') lib.addBookItem('Machine Design', 'CDFTC6432B', 'M201') lib.addBookItem('Machine Design', 'CDFTC6432B', 'M201') lib.addBook('Theory of Machines', 'Dr. A.G. Ambekar', 'September 1985', '2745') lib.addBookItem('Theory of Machines', 'SMNQS6664A', 'TM301') lib.addBookItem('Theory of Machines', 'SMNQS6664A', 'TM302') lib.viewBooks() lib.removeBookItem('SMNQS6664A') lib.viewBooks() lib.removeBook('Theory of Machines') lib.viewBooks() member1 = Member('Aditya', 'Indore', 24, '9424534453', 'ADI942') member2 = Member('Harish', 'Indore', 25, '9791457862', 'HAR979') print(member2) member1.viewBooks() member1.reserveBook('Thermodynamics') member2.reserveBook('Machine Design') member1.viewBooks() lib.viewissuedBookItems() lib.viewIssuerInfo() member1.returnBook() member2.returnBook() member1.viewBooks() member2.issuedBook('Thermodynamics')
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Tue Jul 28 03:09:55 2020 @author: satyam """ from Book import Book from User import Member, Librarian from Catalog import Catalog book = Book( {"Machine learning using python": [3, "Andreas C Muller", 2019, 378]}) m1 = Member("Satyam swet", "kolkata", 21, 355976254, "NA") catlog = Catalog() while (True): print("welcome") print("1 - display books") print("2 - issue book") print("3 - return books") print("4 - search by name") print("5 - search by author name") print("6 - add book") print("7 - remove book") choice = input() if choice not in ["1", "2", "3", "4", "5", "6", "7"]: print("enter correct choice \n") continue
#b1.addBookItem('123hg','H1B2') #b1.addBookItem('124hg','H1B3') #b1.printBook() catalog = Catalog() b = catalog.addBook('Shoe Dog', 'Phil Knight', '2015', 312) catalog.addBookItem(b, '123hg', 'H1B2') catalog.addBookItem(b, '123hg', 'H1B4') catalog.addBookItem(b, '123hg', 'H1B5') b = catalog.addBook('Moonwalking with Einstien', 'J Foer', '2017', 318) catalog.addBookItem(b, '463hg', 'K1B2') catalog.displayAllBooks() m1 = Member("Vish", "Bangalore", 23, 'asljlkj22', 'std1233') m2 = Member("Anshu", "Lucknow", 26, 'asljlkj19', 'std1210') librarian = Librarian("Awantik", "Bangalore", 34, 'asljlkj22', 'zeke101') print(m1) print(librarian) print(m2) res = m1.issueBook('Shoe Dog', catalog, days=10) print(res) res = m1.returnBook("Shoe Dog") print(res)
librarian.addBookItem(book1, '101hg', 'H1A1') librarian.addBookItem(book1, '102hg', 'H1A2') librarian.addBookItem(book1, '103hg', 'H1A3') librarian.addBookItem(book2, '201hg', 'H1B1') librarian.addBookItem(book2, '202hg', 'H1B2') librarian.addBookItem(book3, '301hg', 'H1C1') librarian.addBookItem(book3, '302hg', 'H1C2') # librarian.removeBookFromCatalog('A novel') # librarian.removeBookItem('A novel', '102hg') librarian.displayAllBooks() member1 = Member("Ashish", "Bangalore", 23, 'asljlkj22', 'std1233') # print(member1.searchByAuthor('J Foer')) # member1.displayAllBooks() member1.issueBook('A novel') member1.issueBook('Moonwalking with Einstien') # member1.issueBook('Moonwalking with Einstien') member1.issueBook('I heard you paint houses') librarian.displayAllBooks() member2 = Member('Abhinov', "Dharamshala", 19, '231514514', 'std232') member2.issueBook('A novel') member2.issueBook('Moonwalking with Einstien')
librarian.addBookItem('Moonwalking with Einstien', '466hg', 'K1B5') librarian.displayAllBooks() librarian.removeBookItemFromCatalog("125hg") librarian.displayAllBooks() librarian.removeBook("Shoe Dog") librarian.displayAllBooks() librarian.addBook('Shoe Dog', 'Phil Knight', '2015', 312) librarian.addBookItem("Shoe Dog", '123hg', 'H1B2') librarian.addBookItem("Shoe Dog", '124hg', 'H1B4') librarian.addBookItem("Shoe Dog", '125hg', 'H1B5') librarian.displayAllBooks() librarian.searchBook() print("\n\n") print("Testing Student and its functions:", "\n") m1 = Member("Vish", "Bangalore", 23, 'asljlkj22', 'std1233') print(m1) m1.issueBook("Moonwalking with Einstien", 5) m1.books_issued m1.displayAllBooks() m1.returnBook("466hg") m1.books_issued m1.displayAllBooks() librarian.viewMembers() m2 = Member("Aditya", "Delhi", 21, 'dkbcwibwei23', 'std1234') print(m2) m2.issueBook("Shoe Dog") m2.books_issued m2.returnBook("123hg") m2.books_issued m2.searchBook()
# -*- coding: utf-8 -*- import sys from Library import Library from User import Member from catalog import Catalog from Librarian import Librarian library = Library({"the reader":[4,"bernhard schlink","120H",1995,218],"the secret garden":[3,"frances hodgson burnett","121H",1911,375],"number of stars":[5,"lois lowry","122H",1989,137]},"Study Club") m1 = Member("@rajkumarra_123","raj123Ai_9","rajkumar","*****@*****.**","9982030680","NA","100") catalog = Catalog() while(True): print("welocome to the {} library.please Enter your choice".format(library.name)) print("1","display_books") print("2","lend_book") print("3","return book") print("4","pay fine") print("5","search book By book_Name") print("6","search book By Author_Name")2 print("\n") print("this is Librarian task please login with Librarian_id to perform task") print("7","add book") print("8","remove book") user_choice = input() if user_choice not in ["1","2","3","4","5","6","7","8"]: print("please Enter correct choice \n") continue else: user_choice = int(user_choice) if user_choice == 1: print("we have following books in {} library".format(library.name)) library.display_books()
b1 = Book('Shoe Dog', 'Phil Knight', '2015', 312) b1.addBookItem('123hg', 'H1B2') b1.addBookItem('124hg', 'H1B3') b1.printBook() catalog = Catalog() b = catalog.addBook('Shoe Dog', 'Phil Knight', '2015', 312) catalog.addBookItem(b, '123hg', 'H1B2') catalog.addBookItem(b, '124hg', 'H1B4') catalog.addBookItem(b, '125hg', 'H1B5') b = catalog.addBook('Moonwalking with Einstien', 'J Foer', '2017', 318) catalog.addBookItem(b, '463hg', 'K1B2') catalog.displayAllBooks() m1 = Member("Vish", "Bangalore", 23, 'asljlkj22', 'std1233') librarian = Librarian("Awantik", "Bangalore", 34, 'asljlkj22', 'zeke101') print(m1) print(librarian) b = catalog.searchByName('Shoe Dog') print(b) m1.viewBooks() catalog.removeBookItem('Shoe Dog', '124hg')
import sys from Book import Book from Catalog import Catalog from User import Librarian from User import Member m1 = Member("Vish", "Bangalore", 23, 'asljlkj22', 'std1233') lib = Librarian("Awantik", "Bangalore", 34, 'asljlkj22', 'zeke101') lib.addBook('Shoe Dog', 'Phil Knight', "Biography", '2015') lib.addBookItem("Shoe Dog", "123pk", "H1B1") lib.addBookItem("Shoe Dog", "124pk", "H1B2") lib.addBook('Kafka On The Shore', 'Haruki Murakami', "Fiction", '2002') lib.addBookItem("Kafka On The Shore", "854hm", "C1B1") lib.addBookItem("Kafka On The Shore", "685hm", "C1B2") lib.addBook('The Fault In Our Stars', 'John Green', "Romance", '2012') lib.addBookItem("The Fault In Our Stars", "957jg", "R1B1") lib.addBookItem("The Fault In Our Stars", "985jg", "R1B2") b = lib.addBook('Moonwalking with Einstien', 'J Foer', 'Adventure', '2017') lib.addBookItem(b, '463hg', 'K1B2') while (True): print("welocome to the {} library.please Enter your choice".format( lib.name)) print("1", "display_books") print("2", "Issue_book") print("3", "Return book") print("4", "Search book By book_Name") print("5", "Search book By Author_Name") print("\n")
from Book import Book from Catalog import Catalog from User import User from User import Member, Librarian c = Catalog() b1 = c.addBook('Politics of Opportunism','R P N Singh', '2019',100) c.addBookItem(b1,'isbn1','R1') c.addBookItem(b1,'isbn1-2','R1-2') b2 = c.addBook('Malayalam poetry','Akkitham Achuthan Namboodri', '2019',130) c.addBookItem(b2,'isbn2','R2') b3 = c.addBook('Celestial Bodies','Jokha Alharthi', '2019',140) c.addBookItem(b3,'isbn3','R3') m = Member('member1','bangalore',24,'123412341234',25,c) bi1 = m.issueBook('Politics of Opportunism') bi2 = m.issueBook('Politics of Opportunism') m.returnBook(bi1) bi3 = m.issueBook('Politics of Opportunism') bi4 = m.issueBook('Politics of Opportunism')
catalog = Catalog() b = catalog.addBook('Shoe Dog', 'Phil Knight', '2015', 312) catalog.addBookItem(b, '123hg', 'H1B2') catalog.addBookItem(b, '124hg', 'H1B4') catalog.addBookItem(b, '125hg', 'H1B5') b = catalog.addBook('Moonwalking with Einstien', 'J Foer', '2017', 318) catalog.addBookItem(b, '463hg', 'K1B2') catalog.displayAllBooks() catalog.searchByName('Lean In') catalog.searchByAuthor('J.K.Rowling') m1 = Member("Vish", "Bangalore", 23, 'asljlkj22', 'std1233') m2 = Member("Chaitali", "Pune", 28, 'chaitali123', 'HS1166') m3 = Member("Jane", "Punr", 25, 'jane123', 'HS1177') librarian = Librarian("Awantik", "Bangalore", 34, 'asljlkj22', 'zeke101') print(m1) print(librarian) #m1.issueBook librarian = Librarian("Awantik", "Bangalore", 34, 'asljlkj22', 'zeke101') lib1 = librarian.addBook('Lean In', 'Sheryl Sandberg', 2018, 600) catalog.addBookItem(lib1, '454hs', 'H1B6') catalog.addBookItem(lib1, '456hs', 'H1B7')
# librarian.displayAllBookItems(catalog) # librarian.removeBook(catalog,"2 states") # librarian.displayDifferentBooks(catalog) # librarian.displayAllBookItems(catalog) # librarian.displayDifferentBooks(catalog) # librarian.displayAllBookItems(catalog) # librarian.removeBookItem(catalog,'2 states','#2287') # librarian.displayDifferentBooks(catalog) # librarian.displayAllBookItems(catalog) print("##################") print("user operations") print("##################") member = Member('sagar', 'jaipur', 21, 344564, 33033) print(member) # member.searchCatalogByName(catalog,'2 states') # member.searchCatalogByAuthor(catalog,'Chetan Bhagat') # print(member.showInventory(catalog)) librarian.displayDifferentBooks(catalog) librarian.displayAllBookItems(catalog) rinfo1 = member.issueBook(catalog, '2 states', '#2287') rinfo2 = member.issueBook(catalog, '2 states', '#2284') librarian.displayDifferentBooks(catalog) librarian.displayAllBookItems(catalog)
import sys from Library import Library from User import Member from catalog import Catalog from Librarian import Librarian library = Library( { "the photo": [4, "hollo", "03", 222, 111], "the land": [3, "tree", "05", 333, 444], "The house": [5, "blue", "66", 999, 777] }, "luck") m1 = Member("@sky", "sky_blue123", "pink", "*****@*****.**", "9988776655", "NA", "100") catalog = Catalog() while (True): print("welocome to the {} library.please Enter your choice".format( library.name)) print("1", "display_books") print("2", "lend_book") print("3", "return book") print("4", "pay fine") print("5", "search book By book_Name") print("6", "search book By Author_Name") print("\n") print( "this is Librarian task please login with Librarian_id to perform task" ) print("7", "add book") print("8", "remove book") user_choice = input()
lib.addBook('Shoe Dog', 'Phil Knight', "2015", 312) lib.addBookItem("Shoe Dog", "123pk", "H1B1") lib.addBook('Iron Man', 'Tony Stark', "2001", 800) lib.addBookItem("Iron Man", "123im", "I1B1") lib.addBook('Moonwalking with Einstien', 'J Foer', "2017", 318) lib.addBookItem("Moonwalking with Einstien", "325ad", "A1B1") lib.addBookItem("Moonwalking with Einstien", "326ad", "A1B2") lib.addBook('Harry Potter', 'J K Rowling', "1997", "312") lib.addBookItem("Harry Potter", "854hm", "C1B1") lib.displayAllBooks() lib.removeBookItemFromCatalog("325ad") lib.displayAllBooks() lib.removeBook("Moonwalking with Einstien") lib.displayAllBooks() member1 = Member("Ron", "Pune", 21, "LID547895", "STU343231") member2 = Member("Rhea", "Kerala", 20, "LID43218", "STU656461") member2.searchByName("Shoe Dog") member1.searchByAuthor("Steve") member1.searchByAuthor("Tony Stark") member1.issueBook("Shoe Dog", "123pk") lib.displayAllBooks() member1.returnBook("Shoe Dog", "123pk", "H1B1") lib.displayAllBooks() lib.displayMembers()
# -*- coding: utf-8 -*- from User import Member, Librarian from Catalog import Catalog #creating useres user1 = Member("prasanna","bangalore",22,"zxcc8765","std123") user2 = Member("prashanth","bangalore",23,"zxcc5765","std143") #creating a librarian lib1 = Librarian("admin","mysore",34,"avcgh4352","emp123") #adding book and book items book = lib1.addBook("harry potter","william",2001,500) lib1.addBookItem(book,"123zxc43","h101") lib1.addBookItem(book,"123zxc44","h102") lib1.addBookItem(book,"123zxc45","h103") lib1.addBookItem(book,"123zxc46","h104") book = lib1.addBook("ironman","jhon",2005,300) lib1.addBookItem(book,"125zgc10","g101") lib1.addBookItem(book,"125zgc11","g102") lib1.addBookItem(book,"125zgc12","g103") lib1.addBookItem(book,"125zgc13","g104") book = lib1.addBook("attitude","xyz",2016,350) lib1.addBookItem(book,"765zgc10","h101") lib1.addBookItem(book,"765zgc12","s102") lib1.displayBooks()#displaying the inventory print("\n\n")
catalog.addBookItem(b, '123hg', 'H1B2') catalog.addBookItem(b, '123hg', 'H1B4') catalog.addBookItem(b, '123hg', 'H1B5') # catalog.addBookItem(b, '123hg','H1B2') # catalog.addBookItem(b, '124hg','H1B4') # catalog.addBookItem(b, '125hg','H1B5') b = catalog.addBook('Moonwalking with Einstien', 'J Foer', '2017', 318) catalog.addBookItem(b, '463hg', 'K1B2') # entries done catalog.displayAllBooks() m1 = Member("Vish", "Bangalore", 23, 'asljlkj22', 'std1233') librarian = Librarian("Awantik", "Bangalore", 34, 'asljlkj22', 'zeke101') print(m1) print(librarian) b = catalog.searchByName('Shoe Dog') print(b) # Lets test some new catalog functions result = catalog.searchByAuthor('Phil Knight') print(result) catalog.removeBookItem('Shoe Dog', '123hg') # removes one copy catalog.displayAllBooks()
catalog.displayAllBooks() choice = input("Do you wish to continue (y/n): ") if choice == 'y': continue else: break elif choice == 'h' or choice == 'H': while True: print("Please enter the following new member details:") name = input("Enter New member name: ") location = input("Enter member location: ") age = input("Age of the member: ") aadhar_id = input("Aadhar ID number: ") student_id = input("Student ID number: ") m1 = Member(name, location, age, aadhar_id, student_id) choice = input("Do you wish to add another member (y/n): ") if choice == 'y': continue else: break elif choice == 'i' or choice == 'I': while True: name = input("Enter title of book to borrow: ") isbn = input("Enter ISBN : ") catalog.issueBook(name, isbn) choice = input("Do you wish to borrow another book (y/n): ") if choice == 'y': continue else:
lib.addBook('Shoe Dog', 'Phil Knight', "Biography", '2015') lib.addBookItem("Shoe Dog", "123pk", "H1B1") lib.addBookItem("Shoe Dog", "124pk", "H1B2") lib.addBook('Kafka On The Shore', 'Haruki Murakami', "Fiction", "2002") lib.addBookItem("Kafka On The Shore", "854hm", "C1B1") lib.addBookItem("Kafka On The Shore", "685hm", "C1B2") lib.addBook('The Fault In Our Stars', 'John Green', "Romance", "2012") lib.addBookItem("The Fault In Our Stars", "957jg", "R1B1") lib.addBookItem("The Fault In Our Stars", "985jg", "R1B2") lib.viewBooks() lib.removeBookItem("985jg") lib.viewBooks() lib.removeBook("The Fault In Our Stars") lib.viewBooks() member1 = Member("Niel", "Mumbai", 23, "ABCD4321", "STUD4321") member2 = Member("Nitin", "Mumbai", 23, "DCBA4321", "STUD8765") print(member2) member1.viewBooks() member1.searchByTitle("Kafka On The Shore") member1.searchByTitle("Rich Dad Poor Dad") member1.searchByAuthor("Phil Knight") member1.searchByAuthor("Robert Kiyosaki") member1.searchByCategory("Fiction") member1.searchByCategory("Self Help") member1.searchByPublicationDate("2015") member1.searchByPublicationDate("2013") member1.reserveBook("Shoe Dog") member2.reserveBook("Kafka On The Shore") member1.viewBooks()
Jim = Cook('Jim', 'jim', 'test') # Manager manager = Manager('y', 'y', 'y') # Salesperson Anderson = Salesperson('Anderson', 'anderson1', 'password', 1000.00, 'Foodies') #sales person example Patrick = Salesperson('Patrick', 'patrick', 'password', 1000.00, 'Foodies') #sales person example # Users deliveryJiaMing = Delivery('Jia Ming Ma', 'u', 'p', 'City College of New York') deliveryBot2 = Delivery('Auto Bidding Bot', 'u2', 'p2', 'JFK Airport') void = Guest('void1', 'void2') eric = Member('eric', 'eric', 'eric', 't', 't', 'Coney Island') jd = Member('jd', 'jd', 'jd', 't', 't', 'Bronx Zoo') wilson = Member('wilson', 'wilson', 'wilson', 't', 't', 'Flushing Ave, NY') chue = VIP('chue', 'bloo', 'blee', 'blee', 'blop', 'Empire State Building') #### addDeliveryPerson(deliveryBot2) addSalesperson(Anderson) addSalesperson(Patrick) Members.append(eric) VIPs.append(chue) Cooks.append(John) Cooks.append(Jim) #### addDeliveryPerson(deliveryJiaMing)
catalog.removeBookItem('Shoe Dog', '124hg') catalog.displayAllBooks() # serching a book b = catalog.searchByName('Shoe Dog') print(b) #librarian object librarian = Librarian("Awantik", "Bangalore", 34, 'asljlkj22', 'zeke101') # librarian adding book l = librarian.addBook(catalog, 'How to write clean code', 'David', '2020', 150) l1 = Book('How to write clean code', 'David', '2020', 150) # librarian adding book items librarian.addBookItem(l, '1234hg', 'H1B2') librarian.addBookItem(l, '1235hg', 'H1B2') catalog.displayAllBooks() # librarian removing bookitem we need to paas class object for calling class methods librarian.removeBookItemFromCatalog(catalog, l1, 'How to write clean code', '1234hg') # librarian removing book librarian.removeBook(catalog, 'Shoe Dog') # memeber Object m1 = Member("Vish", "Bangalore", 23, 'asljlkj22', 'std1233') # member is issuing book and then system will update our inventory m1.issueBook(catalog, b1, 'Shoe Dog') catalog.displayAllBooks() # when member returns a book,then system will update our inventory m1.returnBook(catalog, b1, 'Shoe Dog') catalog.displayAllBooks()
elif Option == 2: clear_output() displayScores() clear = input('Enter 1 to go back ') if clear == 1: clear_output() continue elif Option == 3: logged_in = False elif choice == 2: print('Enter your details to take the quiz: ') name = input('Name: ') Date = date.today() member = Member(name, Date) clear_output() test = input('Enter yes to take the test: ') while test.lower() == 'yes': clear_output() Score = takeQuiz() updateScore(name, Score) test = input('Do you want to take the quiz again ') if test.lower() == 'no': print('thank you for taking the quiz. ') else: flag = False clear_output()
lib.addBookItem("Crack IELTS", "002aa", "B2") lib.addBook("Crack coding round", "Saurabh Jadhav", "2002") lib.addBookItem("Crack coding round", "001ab", "C1") lib.addBookItem("Crack coding round", "002ab", "C2") lib.addBook("Theory of everything", "Stephen hawking", "2012") lib.addBookItem("Theory of everything", "001ac", "D1") lib.addBookItem("Theory of everything", "002ac", "D2") lib.addBookItem("Theory of everything", "003ac", "D2") lib.viewBooks() lib.removeBookItem("001ac") lib.viewBooks() lib.removeBook("Crack coding round") lib.viewBooks() member1 = Member("Ashwani Devesh Kashyap", "Mumbai", 23, "ADK4321", "NESS4321") member2 = Member("Shivani Kashyap", "Surat", 19, "SK1234", "MSU8765") member3 = Member("Navneet Kashyap", "Patna", 21, "NK9876", "JSPM1715") print(member1) print(member2) print(member3) member1.viewBooks() member1.search_by_book_name("Theory of everything") member1.search_by_book_name("The magic of thinking big") member1.search_by_author_name("Stephen Hawking") member1.search_by_author_name("JK rowling") member1.issue_book("Theory of everything", 8) member2.issue_book("Crack IELTS", 10) member1.viewBooks() lib.view_issued_books()
catalog.addBookItem(b, '123hg','H1B2') catalog.addBookItem(b, '124hg','H1B4') catalog.addBookItem(b, '125hg','H1B5') b = catalog.addBook('Einstien','J ', '2017',318) catalog.addBookItem(b, '463hg','K1B2') b = catalog.addBook('C','E Balguruswamy', '1985',319) catalog.addBookItem(b, '473A','K1B3') b = catalog.addBook('Verses','Walker', '2011',320) catalog.addBookItem(b, '483B','K1B4') catalog.displayAllBooks() m1 = Member("pavan","hassan",23,'asljlk@j22','std1233') librarian = Librarian("veeresh", "Bangalore",24,'asljlk@j32', 'zeke101') print (m1) print (librarian) b = catalog.searchByName('python') print (b) b = catalog.searchByName('C') print (b) b = catalog.searchByAuthor('dennis') print (b) #catalog.removeBookItem('Shoe Dog','124hg')
lib.addBookItem("Progrmming", "isbn6", "H1C2") lib.displayAllBooks() lib.addBook('Python','reema thareja', "200",320) lib.addBookItem("Python", "isbn7", "H1D1") lib.addBookItem("Python", "isbn9", "H1D2") lib.displayAllBooks() lib.removeBook("Python") lib.displayAllBooks() lib.removeBookItemFromCatalog("isbn1") lib.displayAllBooks() m1 = Member("Sharma", "Ap", 20, "AA990", "STUID112") print(m1) m1.searchByName("Shoe Dog") m1.searchByAuthor('imran khan') m1.displayAllBooks() m1.issueBook("Progrmming", "isbn4") m1.displayAllBooks() m1.returnBook("Progrmming", "isbn4","H1C1") m1.displayAllBooks()
b = catalog.addBook('Moonwalking with Einstien', 'J Foer', '2017', 318) catalog.addBookItem(b, '463hg', 'K1B2') b = catalog.addBook('Pax', 'Sara Pennypacker', '2017', 288) catalog.addBookItem(b, '554jk', 'M24A') catalog.addBookItem(b, '556jk', 'M25A') catalog.addBookItem(b, '557jk', 'M26A') catalog.displayAllBooks() catalog.removeBook('Pax') catalog.displayAllBooks() catalog.removeBookItem('Shoe Dog', '124hg') catalog.displayAllBooks() b = catalog.searchByName('Shoe Dog') print(b) b = catalog.searchByAuthor('J Foer') print(b) #member m1 = Member("Vish", "Bangalore", 23, 'asljlkj22', 'std1233') m1.availableBooks(catalog) print(m1) m1.issueBook('Moonwalking with Einstien', catalog) m1.returnBook('Moonwalking with Einstien', catalog)
b1.printBook() catalog = Catalog() b = catalog.addBook('Shoe Dog','Phil Knight', '2015',312) catalog.addBookItem(b, '123hg','H1B2') catalog.addBookItem(b, '123hg','H1B4') catalog.addBookItem(b, '123hg','H1B5') b = catalog.addBook('Moonwalking with Einstien','J Foer', '2017',318) catalog.addBookItem(b, '463hg','K1B2') catalog.displayAllBooks() m1 = Member("Vish","Bangalore",23,'asljlkj22','std1233') m1.issueBook('Shoe Dog','123hg') catalog.displayAllBooks() m1.returnBook('Shoe Dog','123hg','H1B2') librarian = Librarian("Awantik","Bangalore",34,'asljlkj22','zeke101') librarian.addBook('Shoe Dog','Phil Knight', '2015',312) # librarian.removeBook('Shoe Dog') # librarian.removeBookItemFromCatalog(b,'123hg') print (m1) print (librarian) b = catalog.searchByName('Shoe Dog') print (b) catalog.removeBookItem('Shoe Dog','124hg')