Skip to main content

Posts

Featured

Library Management System

  class Book : def __init__ ( self , title , author , genre ): self .title = title self .author = author self .genre = genre class Library : def __init__ ( self ): self .books = [] def add_book ( self , book ): self .books. append ( book ) def search_book ( self , title ): for book in self .books: if book.title.lower() == title .lower(): return book return None def display_books ( self ): if not self .books: print ( "No books in the library." ) else : print ( "Library Inventory:" ) for book in self .books: print ( f "Title: { book.title } , Author: { book.author } , Genre: { book.genre } " ) def main (): library = Library () while True : print ( " \n Library Management System" ) print ( "1. Add Book" ) print ( &q

Latest Posts

python turtle

pandas

Excel sheet related data

Merry Christmas

draw Rose flower using python

Python turtle graphics design

India flag