CS project
CS project
2 JALAHALLI EAST
BANGALORE
A PROJECT REPORT
ON
CHEMIST SHOP MANAGEMENT!!!
FOR
CBSE 2024-25 EXAMINATION
[AS A PART OF THE COMPUTER SCIENCE(083)]
DONE BY:
SUHANA BALIYAN
work experience.
project.
INDEX
1. CERTIFICATE
2. ACKNOWLEDGEMENT
3. INTRODUCTION
4.THEORITICAL APPROACH
5. CODING
6. OUTPUT
7. BIBLOGRAPHY
INTRODUCTION
What is Python?
2) Expressive Language
3) Interpreted Language
4) Cross-platform Language
Python can run equally on different platforms such as Windows,
Linux, Unix and Macintosh etc. So, we can say that Python is a
portable language.
6) Object-Oriented Language
• RAM : 2GB
• PROCESSOR : INTEL CORE i5
• OPERATING SYSTEM : MS Windows 10
SOFTWARES USED
Main Code
# library import
import mysql.connector as m
import time
import random as rd
def medicine():
# function to add a medicine
def addmedicine():
print("\n")
mid = input("Enter Medicine Id : ")
name = input("Enter Medicine Name : ")
mf = input("Enter Name of Manufacturer : ")
dom = input("Enter Date of Manufacture : ")
doe = input("Enter Date of Expiry : ")
mg = input("Enter the Weight (in mg) : ")
content = input("Enter Content : ")
price = input("Enter the Price : ")
qty = input("Enter the Quantity : ")
print("\nSTORING MEDICINE DETAILS.......")
time.sleep(2)
q = "insert into medicine values(%s,%s,%s,%s,%s,%s,%s,%s,%s)"
data = (mid, name, mf, dom, doe, mg, content, price, qty)
cursor = c.cursor()
cursor.execute(q, data)
print("\nMedicine Inserted.......!!!!")
print("\n")
c.commit()
def showbills():
q = "select * from bill"
cursor = c.cursor()
cursor.execute(q)
res = cursor.fetchall()
print("\n")
print("-" * 95)
print("BillNo\tName\t\tMedicine\t\t\t\tAmount\t\tDateofBill")
print("-" * 95)
for k in res:
print(str(k[0]) + "\t" + k[1] + "\t\t" + k[2] + "\t\t" + str(k[3]) +
"\t\t" + str(k[4]))
print("-" * 95)
print("\n")
while True:
print("\t\t\tS.I.T.I Medical Store")
print("\n")
print("Press 1 - Add New Medicine")
print("Press 2 - Restock a Medicine")
print("Press 3 - Show All Medicines")
print("Press 4 - Search a Medicine")
print("Press 5 - Delete a Medicine")
print("Press 6 - Billing")
print("Press 7 - Display Previous Bills")
print("press 8 - to Exit")
print("\n")
opt = int(input("Enter Your Choice : "))
if opt == 1:
addmedicine()
elif opt == 2:
restock()
elif opt == 3:
showmedicine()
elif opt == 4:
search()
elif opt == 5:
deletem()
elif opt == 6:
billing()
elif opt == 7:
showbills()
elif opt == 8:
print("THANKS FOR VISITING..!!")
print("\t\t Have a Medicine-Free Life Ahead")
print("*" * 95)
break
else:
print("You're having only 8 options to choose -___-")
break
# setting connection
c = m.connect(host="localhost", user="root", password="root",
database="project", auth_plugin='mysql_native_password')
if c.is_connected():
print("\n")
print("\t\t\tCHEMIST SHOP MANAGEMENT")
print("\n")
medicine()
print("\t\tThanks for Visiting....!!!")
else:
print("Connection Error !!!!!")
OUTPUT
Enter your Choice : 1
Enter choice : 4
Enter choice : 5
Enter choice : 6
Enter choice : 7
Medicine Table
Billing table
BIBLOGRAPHY
3. Class Notes