/ Python And R Data science skills: 11 program for library management python telugu

Saturday 17 February 2018

11 program for library management python telugu

11 program for library management

library class contains abstraction layers are lend abook,available books,a ad book,

student class contanis request a book ,return a book

In [2]:
class Library:
    def displayAvailablebooks(self):
        pass
    def lendBook(self):
        pass
    def addBook(self):
        pass
class Student:
    def requestBook(self):
        pass
    def returnBook(self):
        pass        
In [3]:
#skelliton
class Library:
    def displayAvailablebooks(self):
        pass
    def lendBook(self):
        pass
    def addBook(self):
        pass
class Student:
    def requestBook(self):
        pass
    def returnBook(self):
        pass
    
library=Library()
student=Student()
In [4]:
#list of book
class Library:
    def displayAvailablebooks(self):
        pass
    def lendBook(self):
        pass
    def addBook(self,returnedBook):
        pass
class Student:
    def requestBook(self):
        pass
    def returnBook(self):
        pass
    
library=Library(["php","seo","python"])
student=Student()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-4-21b3c3d37deb> in <module>()
     13         pass
     14 
---> 15 library=Library(["php","seo","python"])
     16 student=Student()

TypeError: object() takes no parameters
In [5]:
#iniit method

class Library:
    def __init__(self,listofbooks):
        self.availablebooks=listofbooks
    def displayAvailablebooks(self):
        pass
    def lendBook(self):
        pass
    def addBook(self,returnedBook):
        pass
class Student:
    def requestBook(self):
        pass
    def returnBook(self):
        pass
    
library=Library(["php","seo","python"])
student=Student()
In [9]:
#dipay available books method code

class Library:
    def __init__(self,listofbooks):
        self.availablebooks=listofbooks
    def displayAvailablebooks(self):
        print("The books we have in our library are as follows:")
        print("================================")
        for book in self.availablebooks:
            print(book)  

    def lendBook(self):
        pass
    def addBook(self,returnedBook):
        pass
class Student:
    def requestBook(self):
        pass
    def returnBook(self):
        pass
    
library=Library(["php","seo","python"])
student=Student()
In [2]:
#execute available book
class Library:
    def __init__(self,listofbooks):
        self.availablebooks=listofbooks
    def displayAvailablebooks(self):
        print("The books we have in our library are as follows:")
        print("================================")
        for book in self.availablebooks:
            print(book)  

    def lendBook(self):
        pass
    def addBook(self,returnedBook):
        pass
class Student:
    def requestBook(self):
        pass
    def returnBook(self):
        pass
    
library=Library(["php","seo","python"])
student=Student()
library.displayAvailablebooks()
The books we have in our library are as follows:
================================
php
seo
python
In [14]:
#Student request book
class Library:
    def __init__(self,listofbooks):
        self.availablebooks=listofbooks
    def displayAvailablebooks(self):
        print("The books we have in our library are as follows:")
        print("================================")
        for book in self.availablebooks:
            print(book)  

    def lendBook(self):
        pass
    def addBook(self,returnedBook):
        pass
class Student:
    def requestBook(self):
        print("Enter the name of the book you'd like to borrow>>")
        self.book=input()
        return self.book

    def returnBook(self):
        pass
    
library=Library(["php","seo","python"])
student=Student()
In [16]:
#Student request book and lend book method
class Library:
    def __init__(self,listofbooks):
        self.availablebooks=listofbooks
    def displayAvailablebooks(self):
        print("The books we have in our library are as follows:")
        print("================================")
        for book in self.availablebooks:
            print(book)  

    def lendBook(self,requestedBook):
        if requestedBook in self.availablebooks:
            print("The book you requested has now take")
            self.availablebooks.remove(requestedBook)
        else:
            print("Sorry the book not availabe")
                  
        
    def addBook(self,returnedBook):
        pass
class Student:
    def requestBook(self):
        print("Enter the name of the book you'd like to borrow>>")
        self.book=input()
        return self.book

    def returnBook(self):
        pass
    
library=Library(["php","seo","python"])
student=Student()
In [17]:
#Student request book and lend book method
class Library:
    def __init__(self,listofbooks):
        self.availablebooks=listofbooks
    def displayAvailablebooks(self):
        print("The books we have in our library are as follows:")
        print("================================")
        for book in self.availablebooks:
            print(book)  

    def lendBook(self,requestedBook):
        if requestedBook in self.availablebooks:
            print("The book you requested has now been borrowed")
            self.availablebooks.remove(requestedBook)
        else:
            print("Sorry the book you have requested is currently not in the library")
                  
        
    def addBook(self,returnedBook):
        pass
class Student:
    def requestBook(self):
        print("Enter the name of the book you'd like to borrow>>")
        self.book=input()
        return self.book

    def returnBook(self):
        pass
    
library=Library(["php","seo","python"])
student=Student()
In [19]:
#return book
class Library:
    def __init__(self,listofbooks):
        self.availablebooks=listofbooks
    def displayAvailablebooks(self):
        print("The books we have in our library are as follows:")
        print("================================")
        for book in self.availablebooks:
            print(book)  

    def lendBook(self,requestedBook):
        if requestedBook in self.availablebooks:
            print("The book you requested has now been borrowed")
            self.availablebooks.remove(requestedBook)
        else:
            print("Sorry the book you have requested is currently not in the library")
                  
        
    def addBook(self,returnedBook):
        pass
class Student:
    def requestBook(self):
        print("Enter the name of the book you'd like to borrow>>")
        self.book=input()
        return self.book

    def returnBook(self):
        print("Enter the name of the book you'd like to return>>")
        self.book=input()
        return self.book

    
library=Library(["php","seo","python"])
student=Student()
In [22]:
#addbook
class Library:
    def __init__(self,listofbooks):
        self.availablebooks=listofbooks
    def displayAvailablebooks(self):
        print("The books we have in our library are as follows:")
        print("================================")
        for book in self.availablebooks:
            print(book)  

    def lendBook(self,requestedBook):
        if requestedBook in self.availablebooks:
            print("The book you requested has now been borrowed")
            self.availablebooks.remove(requestedBook)
        else:
            print("Sorry the book you have requested is currently not in the library")
                  
        
    def addBook(self,returnedBook):
        self.availablebooks.append(returnedBook)
        print("Thanks for returning your borrowed book")            
        
class Student:
    def requestBook(self):
        print("Enter the name of the book you'd like to borrow>>")
        self.book=input()
        return self.book

    def returnBook(self):
        print("Enter the name of the book you'd like to return>>")
        self.book=input()
        return self.book

    
library=Library(["php","seo","python"])
student=Student()
In [ ]:
#your choice
class Library:
    def __init__(self,listofbooks):
        self.availablebooks=listofbooks
    def displayAvailablebooks(self):
        print("The books we have in our library are as follows:")
        print("================================")
        for book in self.availablebooks:
            print(book)  

    def lendBook(self,requestedBook):
        if requestedBook in self.availablebooks:
            print("The book you requested has now been borrowed")
            self.availablebooks.remove(requestedBook)
        else:
            print("Sorry the book you have requested is currently not in the library")
                  
        
    def addBook(self,returnedBook):
        self.availablebooks.append(returnedBook)
        print("Thanks for returning your borrowed book")            
        
class Student:
    def requestBook(self):
        print("Enter the name of the book you'd like to borrow>>")
        self.book=input()
        return self.book

    def returnBook(self):
        print("Enter the name of the book you'd like to return>>")
        self.book=input()
        return self.book

    
library=Library(["php","seo","python"])
student=Student()
print(""" ======LIBRARY MENU=======
                  1. Display all available books
                  2. Request a book
                  3. Return a book
                  4. Exit
                  """)
In [ ]:
#your choice
class Library:
    def __init__(self,listofbooks):
        self.availablebooks=listofbooks
    def displayAvailablebooks(self):
        print("The books we have in our library are as follows:")
        print("================================")
        for book in self.availablebooks:
            print(book)  

    def lendBook(self,requestedBook):
        if requestedBook in self.availablebooks:
            print("The book you requested has now been borrowed")
            self.availablebooks.remove(requestedBook)
        else:
            print("Sorry the book you have requested is currently not in the library")
                  
        
    def addBook(self,returnedBook):
        self.availablebooks.append(returnedBook)
        print("Thanks for returning your borrowed book")            
        
class Student:
    def requestBook(self):
        print("Enter the name of the book you'd like to borrow>>")
        self.book=input()
        return self.book

    def returnBook(self):
        print("Enter the name of the book you'd like to return>>")
        self.book=input()
        return self.book

    
library=Library(["php","seo","python"])
student=Student()

print(""" ======LIBRARY MENU=======
              1. Display all available books
              2. Request a book
              3. Return a book
              4. Exit
              """)
while True:
    
    choice=int(input("Enter Choice:"))
    if choice==1:
        library.displayAvailablebooks()
    elif choice==2:
        library.lendBook(student.requestBook())
    elif choice==3:
        library.addBook(student.returnBook())
    elif choice==4:
        quit()

01) Data Science, Deep Learning,& Machine Learning videos in telugu డేటా సైన్స్ ,మెషిన్ లెర్నింగ్ ట్రైనింగ్ వీడియోస్

02) BluePrisam videos in telugu బ్లూ ప్రిజం ట్రైనింగ్ వీడియో

03) Automation Anywhere videos in Telugu ఆటోమేషన్ ఎనీ వెర్ ట్రైనింగ్ వీడియోస్

04) RPA UI PATH videos in telugu UI పాత్ ట్రైనింగ్ వీడియోస్

05) AWS videos in Telugu అమెజాన్ వెబ్ సర్వీస్ అడ్మిన్ ట్రైనింగ్ వీడియోస్

06) DevOps training videos in telugu డెవోప్స్ ట్రైనింగ్ వీడియోస్

07) Digital marketing videos in telugu డిజిటల్ మార్కెటింగ్ ట్రైనింగ్ వీడియోస్

08) Angular 2 and 4 videos in telugu Angular 2 and 4 ట్రైనింగ్ వీడియోస్

09) Oracle WebLogic Server admin videos in Telugu ఒరాకిల్ వెబ్ లాజిక్ సర్వర్ అడ్మిన్

10) How to Improve Wordpress website speed for Google PageSpeed Insights videos in Telugu వర్డ్ ప్రెస్ వెబ్సైటు స్పీడ్ ని ఆప్టిమైజ్

11) please subscribe my youtube channel ప్లీజ్ subscribe my యూటుబ్ ఛానల్

12) Angular Js and NodeJs fast Track videos in telugu Angular and node js ఫాస్ట్ ట్రాక్ ఇన్ తెలుగు

13) FB Marketing 01 Create Page videos in telugu పేస్ బుక్ మార్కెటింగ్ ట్రైనింగ్ వీడియోస్

14) What is google adwords videos in Telugu గూగుల్ ఆడవర్డ్స్ ట్రైనింగ్ వీడియోస్

15) Data Science training Python videos in telugu పైథాన్ ప్రోగ్రామింగ్ వీడియోస్ ఫర్ డేటా సైన్స్ అండ్ మెషిన్ లెర్నింగ్

16) Python videos in telugu పైథాన్ ప్రోగ్రామింగ్ ట్రైనింగ్ వీడియోస్

17) please subscribe my youtube channel ప్లీజ్ subscribe my యూటుబ్ ఛానల్

18) How to verify website in bing webmaster Telugu - Bing webmaster tools Training Videos

19) yandex webmaster tools videos in Telugu

20) Introduction to google,bing, yandex,baidu webmasters videos in telugu

21) WordPress Training videos in telugu WordPress ట్రైనింగ్ వీడియోస్ in Telugu

22) Blogger training videos in telugu బ్లాగర్ ట్రైనింగ్ వీడియోస్ ఇన్ తెలుగు

23) Html and CSS training videos in telugu Html and Css ట్రైనింగ్ వీడియోస్ ఇన్ తెలుగు

24) What is Html 5 and new Elements In Telugu Html 5 ట్రైనింగ్ వీడియోస్ ఇన్ తెలుగు

25) SQL training videos in telugu SQL ట్రైనింగ్ వీడియోస్ ఇన్ తెలుగు

26) Javascript introduction And what is Javascript videos in telugu JavaScript ట్రైనింగ్ వీడియోస్ ఇన్ తెలుగు

27) About JQuery Training videos in Telugu JQuery ట్రైనింగ్ వీడియోస్ ఇన్ తెలుగు

28) AngularJS videos In Telugu AngularJs 1 ట్రైనింగ్ వీడియోస్ ఇన్ తెలుగు

29) What is Php and Uses Of php In Telugu PHP ట్రైనింగ్ వీడియోస్ ఇన్ తెలుగు

30) Ethical Hacking Demo in telugu ఎథికల్ హ్యాకింగ్ డెమో ఇన్ తెలుగు

31) Mean Stack demo in Telugu మీన్ స్టాక్ డెమో తెలుగు లో

32) please subscribe my youtube channel ప్లీజ్ subscribe my యూటుబ్ ఛానల్

No comments:

Post a Comment