You are on page 1of 20

PROJECT NAME

A PROJECT REPORT SUBMITTED TO CENTRAL BOARD OF SECONDARY


EDUCATION FOR THE PARTIAL FULFILLMENT OF INFORMATICS
PRACTICES PROJECT WORK.

SUBMITTED TO: SUBMITTED BY:

MR.IQBAL SINGH ………Ekamjosingh……………………………

INFORMATICS PRACTICES

ARMY PUBLIC SCHOOL, AMRITSAR

PUNJAB-143107

(2020-2021)
SUPERVISION CERTIFICATE
This Is To Certify That Work Presented In The Project
Entitled “__________” Submitted For The Partial
Fulfillment Of CBSE INFORMATICS PRACTICES
Exam To The CBSE New Delhi Is A Bona fide Project
Work Carried Out By………….., A Student Of Class 12,
Army Public School, Amritsar, Punjab Under My
Guidance And Supervision.

MR. IQBAL SINGH


PGT COMPUTER SCIENCE
ARMY PUBLIC SCHOOL AMRITSAR
ACKNOWLEDGEMENT
I Take This Opportunity To Express My Deep Sense Of
Gratitude To Mr.Iqbal Singh, PGT (Computer Science), Army
Public School, Amritsar For His Guidance, Advice And Support
From The Beginning Of My Project Work To The Completion
Of The Same.His Keen Interest In MY Project Work, Devotion
Of Time, Inspiration During This Project Tenure Has Made This
Work To Come In This Form.
I Also Pay Gratitude Towards Our Principal Mrs Rajdeep Jain,
Army Public School Amritsar Permitting Me To Avail Necessary
Facilities Of The Lab As Well As School For My Work . The
Support Received From Friends During My Project Work
Cannot Be Acknowledged In Words.
I Express My Deepest Affection, Appreciation And Thank To
My Parents , Who Encouraged And Supported me In This
Project. All Of Them Have Made Immense Contribution To My
Studies And Life By Their Support, Guidance, Understanding
And Sacrifices.
……………………………….
Army Public School Amritsar
SHOE BILLING SYSTEM

Main menu
def main_menu():

ch=0

print(" ==============================")

print(" Main Menu")

print(" ==============================")

while ch!=9:

print("""

1. Show DataFrame

2. Data without index

3. Data in Ascending order of Sales

4. Add Shoe data into CSV

5. Edit a record

6. Delete a record

7. Line Graph

8. Bar Graph

9. Exit

""")

ch=int(input("Enter your choice:")


I. Coding for show Data Frame

def showData():

df=pd.read_csv("shoes.csv")

print(df)

input("Press Enter to continue....")


t

II. Coding For option Data without index


def dataNoIndex():

df=pd.read_csv("shoes.csv",index_col=0)

print(df)

input("Press Enter to continue...")


III. Coding for Data in ascending order of sale

def data_sorted():

df=pd.read_csv('shoes.csv')

print(df.sort_values(by=['Sales']))

input("Press Enter to continue...")


IV. Coding to add shoe data in CSV

def write_data():

print("Insert data of particular Shoe in list form:")

sn=eval(input("Enter Shoe_Name:"))

pr=eval(input("Enter Price:"))

br=eval(input("Enter Brand:"))

sa=eval(input("Enter Sales:"))

st=eval(input("Enter Stock:"))

d={'Shoe_Name':sn,'Price':pr,'Brand':br,'Sales':sa,'Stock':st}

df=pd.DataFrame(d)

df.to_csv('shoes.csv', mode='a', index=False, header=False)

print("Data has been added.")

input("Press Enter to continue...")


V. Coding to edit a Record
def edit_data():

df=pd.read_csv("shoes.csv")

di=input("Enter Shoe_Name to edit:")

col=input("Enter column name to update:")


val=input("Enter new value:")

df.loc[df[df['Shoe_Name']==di].index.values,col]=val

df.to_csv("shoes.csv",index=False)

print("Record has been updated...")

input("Press Enter to continue...")


VI. Coding to delete a record
def delete_data():

di=input("Enter Shoe_Name to delete data:")

df=pd.read_csv("shoes.csv")

df=df[df.Shoe_Name!=di]

df.to_csv('shoes.csv',index=False)

print("Record deleted...")

input("Press Enter to continue...")


VII. Coding for line graph
def line_chart():

df=pd.read_csv('shoes.csv')

Shoe_Name=df["Shoe_Name"]

Price=df["Price"]

Sales=df["Sales"]

Stock=df["Stock"]

plt.xlabel("Shoe_Name")

Y=0

while Y!=4:

print(" ==============================")

print(" Line Graph Menu")

print(" ==============================")

print("1.Shoe_Name wise Price ")


print("2.Shoe_Name wise Sales ")

print("3.Shoe_Name wise Stock")

print("4.Return to main menu.")

Y = int(input("Enter your choice to get line graph: "))

if Y == 1:

plt.ylabel("Price")

plt.title("Shoe_Name wise Price")

plt.plot(Shoe_Name, Price, color='b')

plt.show()

elif Y == 2:

plt.ylabel("Sales")

plt.title("Shoe_Name wise Sales")

plt.plot(Shoe_Name, Sales, color='g')

plt.show()

elif Y == 3:

plt.ylabel("Stock")

plt.title("Shoe_Name wise Stock")

plt.plot(Shoe_Name, Stock, color='r')

plt.show()

elif Y == 4:

print("Line Graph Closed.....")

main_menu()

else:

print("Sorry!! Invalid Option! Try Again!!!")

main_menu()
VIII. Coding For Bar graph
def bar_chart():

df=pd.read_csv('shoes.csv')

Shoe_Name=df["Shoe_Name"]

Price=df["Price"]

Sales=df["Sales"]

Stock=df["Stock"]

plt.xlabel("Shoe_Name")

print(" ==============================")

print(" Bar Graph Menu")

print(" ==============================")

print("1. Shoe_Name wise Price")

print("2. Shoe_Name wise Sales")

print("3. Shoe_Name wise Stock")

print("4. All data")


print("5. Combine Bar Graph")

print("6. Return to main menu.")

Y=0

while Y!=6:

Y = int(input("Enter your choice to get bar graph: "))

if Y == 1:

plt.ylabel("Price")

plt.title("Shoe_Name wise Price")

plt.bar(Shoe_Name, Price, color='b', width = 0.5)

plt.show()

elif Y == 2:

plt.ylabel("Sales")

plt.title("Shoe_Name wise Sales")

plt.bar(Shoe_Name, Sales, color='g', width = 0.5)

plt.show()

elif Y == 3:

plt.ylabel("Stock")

plt.title("Shoe_Name wise Stock")

plt.bar(Shoe_Name, Stock, color='r', width = 0.5)

plt.show()

elif Y == 4:

plt.bar(Shoe_Name, Price, color='b', width = 0.5, label = "Shoe_Name wise Price")

plt.bar(Shoe_Name, Sales, color='g', width = 0.5, label = "Shoe_Name wise Sales")

plt.bar(Shoe_Name, Stock, color='r', width = 0.5, label = "Shoe_Name wise Stock")

plt.legend()

plt.show()

elif Y == 5:

D=np.arange(len(Shoe_Name))

width=0.25
plt.bar(D,Price, width, color='b', label = "Shoe_Name wise Price")

plt.bar(D+0.25, Sales, width, color='g', label = "Shoe_Name wise Sales")

plt.bar(D+0.50, Stock, width, color='r', label = "Shoe_Name wise Stock")

plt.legend()

plt.show()

elif Y==6:

print("Bar Graph Closed.....")

main_menu()

else:

print("Sorry!! Invalid Option! Try Again!!!")

main_menu()
IX. CSV File

You might also like