Hello welcome guys
guy's aaj ham ek library management system programming karne wale hai or mai apko ye code de dunga
to apko tension lene ki jarurat nhi hai
so guy's mai start karne wala hun
or aap es code ko Android phone me bhi run kar sakte hai
es code ko Android me run karne ke liye ye rhe IDE pydroid3 - IDE for python 3
install karke run kijiye so ab code karna start karte hai
Library Management
name = []
list = []
def booksList():
try:
lis = 1
list = int(input("how many add the book line :"))
for i in range(0,list):
for j in range(0,lis):
n = input(f"{i}.book Name:")
name.append(n)
except(ValueError):
# Print not found message
print("you are wrong input please Try again...... ")
#print(name)
def book():
while(True):
print("\n====Choose the option====")
print("1.display all book::")
print("2.Request the book::")
print("3.return a book::")
print("4.libraru isue book list ::")
print("5.Exit library::\n")
ch = int(input("Opetion choose::"))
if (ch==1):
print ("this Library to all book \n:")
print(name)
elif(ch==2):
try:
bookName = input("Enter the Request book name :")
search = int(name.index(bookName))
print(f"Yes !:{bookName}: book is available")
print(f"Your :{bookName}: book is isue conformed \n please keep it safe return to 30 days \n Thank You :")
name.remove(bookName)
except(ValueError):
# Print not found message
print(f"Sorry !:{bookName}: book is not avialable")
elif(ch==3):
print ("Return book\n ")
#add = input("Return the book name \n:")
add = input("Return the book name")
name.append(add)
elif(ch== 4):
list. append(bookName)
print(list)
list.remove(add)
print(list)
elif(ch==5):
input("Press Enter the Exit.....\n")
exit()
else :
print("hello")
booksList() #this is function call
book() #this is function call
agar aap chahe to es code ko copy kar sakte hai
or IDE me ja kar paste kar sakte hai
so mai aasha karta hun ki ye coding karne me mza aaya hoga
OUTPUT
Comments
Post a Comment