Professional Documents
Culture Documents
PROJECT REPORT
Submitted by:
1|Page
Ryan International School Sharjah
(Affiliated to the Central Board of Secondary Education, New Delhi)
Certificate
Roll no: _________________________
This is to certify that the work in this project is the Bonafide work of
Miss/Master ___________________________________ of Grade __________ Section _______ prescribed by
The Central Board of Secondary Education, New Delhi during the
academic year 2023-2024.
Revathy Venugopal
Teacher-in-charge
____________________________________ ________________________________________________
ACKNOWLEDGEMENT
2|Page
I take this opportunity to express my sincere
gratitude and deep regard to my Computer Science
teacher Mrs. Revathy Venugopal for her valuable
guidance and advice.
3|Page
Abstract
4|Page
Index
CONTENT Page No.
S. No
1. Network 6
Specification of the
Computer
2. CSV Files Used 7
3. Login and Menu 9
Page
4. Add new product 11
5. Show all products 13
in stock
6. Compare products 14
7. Show charts 15
8. Delete products 19
9. Update product 21
5|Page
1. NETWORK SPECIFICATIONS OF THE
COMPUTER
1. A Computer/Laptop with
2. Operating System-Windows 8 or above
3. x86 64-bit CPU (Intel / AMD architecture)
4. 4 GB RAM.
5. 5 GB free disk space.
6|Page
2. CSV FILES USED
a) Electronics List.csv
7|Page
B) Purchased List.csv
8|Page
3. LOGIN AND MENU PAGE
def login():
if pwd == 'employee@abc':
return True
else :
print('password wrong')
return False
def showmenu():
print('------------------------------------------------------------------------------------')
print('------------------------------------------------------------------------------------')
9|Page
ch = int(input('Enter the number:'))
return ch
if login():
while True:
ch = showmenu()
if ch == 1:
addnewproduct()
elif ch == 2:
showproduct()
elif ch == 3 :
compareproducts()
elif ch == 4:
showcharts()
elif ch == 5:
deleteproduct()
elif ch == 6:
updateproduct()
else:
10 | P a g e
4. Add new product
def addnewproduct():
n = pdf['Item_No'].count()
11 | P a g e
pdf.at[n] = [Item_No,Product,Supplier,Product_Description,
Category,Quantity_in_stock,Price_unit,Total_Value,
Stock_Location,Product_code]
pd.set_option('display.max_columns', pdf.columns.size)
pd.set_option('display.expand_frame_repr',False)
print(pdf)
12 | P a g e
5. SHOW ALL PRODUCTS IN STOCK
def showproduct():
pd.set_option('display.max_columns', pdf.columns.size)
pd.set_option('display.expand_frame_repr',False)
print(pdf)
13 | P a g e
6. COMPARE PRODUCTS
def compareproducts():
df = pdf.loc[pdf['Product']==pname1]
df1 = pdf.loc[pdf['Product']==pname2]
if df.empty:
else :
pd.set_option('display.max_columns', pdf.columns.size)
pd.set_option('display.expand_frame_repr',False)
print(df)
if df1.empty:
else :
pd.set_option('display.max_columns', pdf.columns.size)
pd.set_option('display.expand_frame_repr',False)
print(df1)
14 | P a g e
7. SHOW CHARTS
15 | P a g e
import matplotlib.pyplot as plt
def showcharts():
if ch == 1:
16 | P a g e
print('Press 1 - For bar graph')
if a == 1:
df = df[['Product','Quantity_in_stock']]
df.plot('Product','Quantity_in_stock',kind = 'bar')
plt.xlabel('Product')
plt.ylabel('Quantity')
plt.show()
if a == 2:
df = df[['Product','Quantity_in_stock']]
df.plot('Product','Quantity_in_stock',kind = 'line')
plt.xlabel('Product')
plt.ylabel('Quantity')
plt.show()
if ch == 2:
if a == 1:
df = df[['Product','Quantity_Purchased']]
plt.xlabel('Product')
plt.ylabel('Purchsed')
plt.show()
if a == 2:
df = df[['Product','Quantity_Purchased']]
17 | P a g e
df.plot('Product','Quantity_Purchased',kind = 'line', color = 'red')
plt.xlabel('Product')
plt.ylabel('Purchsed')
plt.show()
18 | P a g e
8. DELETE PRODUCTS
def deleteproduct():
if ch == 1:
19 | P a g e
if df1.empty:
else:
pd.set_option('display.max_columns', df1.columns.size)
pd.set_option('display.expand_frame_repr',False)
print(df1)
if ch == 2:
if df1.empty:
else:
pd.set_option('display.max_columns', df1.columns.size)
pd.set_option('display.expand_frame_repr',False)
print(df1)
20 | P a g e
9. UPDATE PRODUCT
def updateproduct():
21 | P a g e
print('Press 2 - To update the Product name')
if ch == 1:
if a>26:
else:
b=int(a-1)
df.loc[b, 'Stock_Location'] = c
pd.set_option('display.max_columns', df.columns.size)
pd.set_option('display.expand_frame_repr',False)
print(df)
if ch == 2:
b=int(a-1)
df.loc[b, 'Product'] = c
pd.set_option('display.max_columns', df.columns.size)
pd.set_option('display.expand_frame_repr',False)
print(df)
22 | P a g e