choice = int(choice)
        if choice == 1:
            print("books available {} ".format(Book.name))
            Book.display_books()
            print("\n")

        elif choice == 2:
            book = input("name of book you want to issue")
            student = input("enter your name")
            m1.issue_book(book, student)
            print("\n")

        elif choice == 3:
            book = input("name of book you want to return")
            student = input("enter your name")
            m1.return_book(book, student)

        elif choice == 4:
            book_name = input("enter the name of the book")
            Catalog.searchbyname(book_name)
            print("\n")

        elif choice == 5:
            author = input("enter the name of the author")
            Catalog.searchbyauthor(author)
            print("\n")

        elif choice == 6:
            libr = Librarian("Shekhar suman", "howrah", 23, 456782125, "Na")
            book_name = input("name of the book which is going to be added")
            quantity = int(input())
Ejemplo n.º 2
0
    else:
        user_choice = int(user_choice)
        if user_choice == 1:
            print("we have following books in {} library".format(library.name))
            library.display_books()
            print("\n")
        elif user_choice == 2:
            book = input("please Enter the name of the book you want to lend :")
            user = input("please enter your name:")
            m1.lend_book(library,book,user)
            print("\n")

        elif user_choice == 3:
            book = input("please Enter the name of the book you want to return :")
            user = input("please enter your name:")
            m1.return_book(library,book,user)
            print("\n")
        elif user_choice == 4:
            book = input("please Enter the name of the book having fine :")
            user = input("please enter your name:")
            m1.cheack_fine(library,book,user)
            print("\n")
            
        elif user_choice == 5:
            book_name = input("Enter the name of book: ")
            catalog.searchByName(library,book_name)
            print("\n")
            
        elif user_choice == 6:
            Author = input("Enter the name of author: ")
            catalog.searchByAuthor(library,Author)
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()

member1.return_book("001ac")
member1.viewBooks()

member2.issue_book("Crack IELTS")

lib.viewMembers()

lib.removeMember("Navneet")
member1.issue_book("Crack IELTS")
lib.viewMembers()
lib.view_issued_books()