bhupesh ip project
bhupesh ip project
PRACTICES
PROJECT WORK
TOPIC :- Library record
keeping
SUBMITTED BY : Bhupesh Kumar
Yadav
---------------------- -----------------------
EXTERNAL’S SIGNATURE
LIBRARY RECORD
KEEPING CODE
print("__________Library Management System__________")
#creating database
import mysql.connector
mydb=mysql.connector.connect(host="localhost",user="root",passwd="how
areyou",charset="utf8")
mycursor=mydb.cursor()
mycursor.execute("use Library")
mydb.commit()
while(True):
print("5=Exit")
if(choice==1):
price=input("Enter price:")
mydb.commit()
elif(choice==2):
mydb.commit()
elif(choice==3):
bookcode=input("Enter book code")
mydb.commit()
elif(choice==4):
for i in mycursor:
print(i)
else:
break
Outputs of Above Code
Result of Above Additon
Choice 2: Delete a Record
Result table
Choice
3: Update a Record
Result table
Choice 4: Search a Record
Result table
THANK
YOU