Python Project Code Word For Cbse 12th Grocery Management
Python Project Code Word For Cbse 12th Grocery Management
1. ABOUT PYTHON
2. ABOUT SQL
3. SPECIFICATIONS
4. ABOUT PROJECT
5. OBJECTIVES OF PROJECT
6. CODE AND OUTPUTS
7. REFERENCES
ABOUT PYTHON
Python is a computer programming language often used to
build websites and software, automate tasks, and conduct data
analysis. Python is a general-purpose language, meaning it
can be used to create a variety of different programs and isn’t
specialized for any specific problems. This versatility, along
with its beginner-friendliness, has made it one of the most-
used programming languages today. A survey conducted by
industry analyst firm RedMonk found that it was the second-
most popular programming language among developers in
2021
Functionalities provided:
1. Provides the searching facilities based on various
factors. Such as Customer, Product Company,
Product Type, Supplier.
elif choice2==3:
worker_name=input('enter your name=')
worker_age=int(input('enter your age='))
worker_salary=float(input('enter your salary='))
phone_no =int(input('enter your phone number='))
sql_insert="insert into worker_details values(""'"+
(worker_name)+"',"+str(worker_age)+",
"+str(worker_salary)+","+str(phone_no)+ ")"
c.execute(sql_insert)
conn.commit()
print('data is updated')
n=1
elif choice2==4:
t=conn.cursor()
t.execute('select*from customer_details')
record=t.fetchall()
for i in record:
print(i)
n=1
elif choice2==5:
t=conn.cursor()
t.execute('select*from product_details')
record=t.fetchall()
for i in record:
print(i)
n=1
elif choice2==6:
t=conn.cursor()
t.execute('select*from worker_details')
record=t.fetchall()
for i in record:
print(i)
n=1
elif choice2==7:
a=input('enter your name')
t="select*from customer_details where
customer_name=('"+(a)+"')"
c.execute(t)
v=c.fetchall()
for i in v:
print(v)
n=1
elif choice2==8:
a=input('enter your product_name')
t='select*from product_details where
product_name=("{}")'.format(a)
c.execute(t)
v=c.fetchall()
for i in v:
print(v)
n=1
elif choice2==9:
a=input('enter your name')
t='select*from worker_details where
worker_name=("{}")'.format(a)
c.execute(t)
v=c.fetchall()
for i in v:
print(v)
n=1
elif choice2==10:
print('******************************************')
a=input('enter your product name')
t='select product_name, product_number_in_stock
from product_details where product_name=("{}")'.format(a)
c.execute(t)
v=c.fetchall()
for i in v:
print(v)
print('******************************************')
n=1
elif choice2==11:
import matplotlib.pyplot as plt
items=('Soap','Butter','Lightbulb','Salt')
avalibility=[123,30,800,12]
colors=['red','yellowgreen','blue','gold']
plt.pie(avalibility,labels=items,colors=colors)
plt.title('avalibility of items in shop')
plt.show()
n=1
elif choice2==12:
a=input('enter worker name')
t='select*from worker_details where
worker_name=("{}")'.format(a)
c.execute(t)
v=c.fetchall()
for i in v:
print(v)
b=int(input('what to update 1.AGE ,2. SALARY ,
3.CONTACT '))
if b==1:
column="worker_age"
value=input('updated age')
u="UPDATE worker_details SET "+ column+"
='"+value+"' where worker_name='"+(a)+"'"
c.execute(u)
conn.commit()
print('data is updated')
n=1
elif b==2:
column="worker_salary"
value=input('updated salary')
u="UPDATE worker_details SET "+ column+"
='"+value+"' where worker_name='"+(a)+"'"
c.execute(u)
conn.commit()
print('data is updated')
n=1
elif b==3:
column="worker_contact"
value=input('updated contact')
u="UPDATE worker_details SET "+ column+"
='"+value+"' where worker_name='"+(a)+"'"
c.execute(u)
conn.commit()
print('data is updated')
n=1
else:
print("enter valid choice")
n=1
elif choice2==13:
a=input('enter worker name')
t='select*from worker_details where
worker_name=("{}")'.format(a)
c.execute(t)
v=c.fetchall()
for i in v:
print(v)
b=int(input('do you really want to fire this guy 1. NO
2.YES '))
if b==1:
exit()
elif b==2:
d="DELETE FROM worker_details where
worker_name='"+(a)+"'"
c.execute(d)
conn.commit()
print('data is updated')
n=1
else:
print("enter valid choice")
n=1
elif choice2==14:
a=input('enter product name')
t='select*from product_details where
product_name=("{}")'.format(a)
c.execute(t)
v=c.fetchall()
for i in v:
print(v)
b=int(input('do you really want to remove this product
1.NO 2.YES '))
if b==1:
exit()
elif b==2:
d="DELETE FROM product_details where
product_name='"+(a)+"'"
c.execute(d)
conn.commit()
print('data is updated')
n=1
else:
print("enter valid choice")
n=1
else:
print('KICKED OUT - Forcefully')
exit()
elif choice==2:
print('Bye master')
exit()
else:
print('KICKED OUT - Forcefully')
exit()
OUTPUT
REFERENCES
1. Wikipedia for the introductory information
2. Sumita Arora’s Class XII book for basic information
3. Tutorials point for information on python
4. Website: https://www.w3resource.co.in