0% found this document useful (0 votes)
136 views36 pages

IP Project

Uploaded by

Chirag
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
136 views36 pages

IP Project

Uploaded by

Chirag
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

INFORMATICS PROJECT

PROJECT
ON

INDIAN
FOOD

NAME:
CLASS:
ROLL NO. :
CERTIFICATE
This is to certifyt hat of class ,
School, has successfully
completed her Investigatory Project as prescribed by CBSE in
the year .

Date :

RollNo.:

Signature of Subject Signature of External


Teacher Examiner
ACKNOWLEDGEMENT

It would be my utmost pleasure to thank my


Computer Science teacher forgiving
me this knowledgeable topic "INDIAN FOOD" and
supporting me during the course of this project. I
would also like to thank my parents and God for
encouraging me and giving me strength to complete
this project on time.
Secondly, I also like to thank my partner for being
co-operative and pally with me throughout the
process and for helping me to make this a full proof
success.
PROGRAMCODE

importpandasaspd

importmatplotlib.pyplotasplt

#Importing CSV file into a dataframe

IndianFood=pd.read_csv("IndianFood.CSV")

print(IndianFood)

#MainMenu

while(True):

print("\n\n\n\t\t############MAINMENU###############")

print("\n\t\t\t 1. Add Data ")

print("\n\t\t\t 2. Modify Data ")

print("\n\t\t\t 3. Delete Data ")

print("\n\t\t\t 4. Search Data ")

print("\n\t\t\t5.VisualizeData")

print("\n\t\t\t 6. Analyse Data ")

print("\n\t\t\t 7. Exit ")

print("\t\t###########################################")

ch=int(input("\t\tEnteryourchoice1-7:"))
if (ch==1):

while(True):

print("Add

Menu")print("1.Addnewcol

umn") print("2. Add new

row") print("3. Exit")

ch1=int(input("Enteryourchoice1-3")) if

(ch1==1):

name=input("Enterthenameofthenewcolumn")

data=input("Enterthevaluebywhichyouwanttoinitializethiscolumn")

IndianFood[name]=data

print(IndianFood)

elif(ch1==2):

name=input("EnternameoftheIndianFood")

ingredient=input("Enter ingredient")

diet=input("Enter diet")

prep=int(input("Enterpreparationtime"))

cook=int(input("Enter cooking time"))

flavor=input("Enter flavor profile")

course=input("Enter course")

state=input("Enter state")
region=input("Enter region")

countrec=IndianFood.shape[0]

IndianFood.loc[countrec]=[name,ingredient,diet,prep,cook,flavor,course,state,region]

print(IndianFood)

else:

break

elif (ch==2):

while(True):

print("ModifyMenu")

print("1. Modify any particular value")

print("2.Modifygivenfooditemdetails")

print("3. Exit")

ch1=int(input("Enteryourchoice1-3")) if

(ch1==1):

data=input("Enterthenewdata")

row=input("Enter row label")

col=input("Enter column label")

IndianFood.at[row,col]=data

print(IndianFood)

elif(ch1==2):
name=input("EnternameoftheIndianFood")

ingredient=input("Enter ingredient")

diet=input("Enter diet")

prep=int(input("Enterpreparationtime"))

cook=int(input("Enter cooking time"))

flavor=input("Enter flavor profile")

course=input("Enter course")

state=input("Enter state")

region=input("Enter region")

countrec=IndianFood.shape[0]

IndianFood.loc[countrec]=[name,ingredient,diet,prep,cook,flavor,course,state,region]

print(IndianFood)

else:

break

elif (ch==3):

while(True):

print(" ")

print("| Delete Menu |")

print("| 1. Delete given food item details |")

print("|2.Deleterecordsofagivenstate(anyIndianstate) |")
print("| 3. Delete records of a given region: East/West/North/South |")

print("|4.Deleterecordsofagivencourse:dessert/maincourse/starter/snack|")

print("| 5. Delete records of a given flavor: sweet/spicy |")

print("| 6. Delete records of a given diet: vegetarian/non vegetarian |")

print("| 7. Exit |")

print(" ")

ch1=int(input("Enteryourchoice1-7:")) if

(ch1==1):

data=input("Enter name of the Indian Food whose details are to be deleted")

IndianFood.drop(IndianFood.loc[IndianFood['name']==data].index,inplace=True)

print(IndianFood)

elif(ch1==2):

stat=input("Enter name of the state whose details are to be deleted")

IndianFood.drop(IndianFood.loc[IndianFood['state']==stat].index,inplace=True)

print(IndianFood)

elif(ch1==3):

stat=input("Enter name of the region whose details are to be deleted")

IndianFood.drop(IndianFood.loc[IndianFood['region']==stat].index,inplace=True)

print(IndianFood)

elif(ch1==4):

stat=input("Enternameofthecoursewhosedetailsaretobedeleted")
IndianFood.drop(IndianFood.loc[IndianFood['course']==stat].index,inplace=True)

print(IndianFood)

elif(ch1==5):

stat=input("Enter name of the flavor whose details are to be deleted")

IndianFood.drop(IndianFood.loc[IndianFood['flavor_profile']==stat].index,inplace=True)

print(IndianFood)

elif(ch1==6):

stat=input("Enter name of the diet whose details are to be deleted")

IndianFood.drop(IndianFood.loc[IndianFood['diet']==stat].index,inplace=True)

print(IndianFood)

else:

break

elif (ch==4):

while(True):

print(" ")

print("| Search Menu |")

print("| 1. Search given food item details |")

print("| 2. Search records of a given state (any Indian state) |")

print("| 3. Search records of a given region: East/West/North/South |")

print("|4.Searchrecordsofagivencourse:dessert/maincourse/starter/snack|")

print("| 5. Search records of a given flavor: sweet/spicy |")


print("| 6. Search records of a given diet: vegetarian/non vegetarian |")

print("| 7. Exit |")

print(" ")

ch1=int(input("Enteryourchoice1-7")) if

(ch1==1):

data=input("EnternameoftheIndianFoodwhosedetailsaretobedisplayed")

print(IndianFood[IndianFood.name==data])

elif(ch1==2):

data=input("Enternameofthestatewhosedetailsaretobedisplayed")

print(IndianFood[IndianFood.state==data])

elif(ch1==3):

data=input("Enternameoftheregionwhosedetailsaretobedisplayed")

print(IndianFood[IndianFood.region==data])

elif(ch1==4):

data=input("Enternameofthecoursewhosedetailsaretobedisplayed")

print(IndianFood[IndianFood.course==data])

elif(ch1==5):

data=input("Enternameoftheflavorwhosedetailsaretobedisplayed")

print(IndianFood[IndianFood.flavor_profile==data])
elif(ch1==6):

data=input("Enternameofthedietwhosedetailsaretobedisplayed")

print(IndianFood[IndianFood.diet==data])

else:

break

elif (ch==5):

while(True):

print(" ")

print("| Visualize Menu |")print("|

1. Visualize cooking time state wise |")

print("| 2. Visualize cooking time region: East/West/North/South wise |")

print("| 3. Visualize cooking time course: dessert/main course/starter/snack wise |")

print("| 4. Visualize cooking time flavor: sweet/spicy wise |")

print("| 5. Visualize cooking time diet: vegetarian/non vegetarian wise |")

print("| 6. Visualize preparation time state wise |")

print("|7.Visualizepreparationtimeregion:East/West/North/Southwise

|")print("|8.Vi

sualizepreparationtimecourse:dessert/maincourse/starter/snackwise|") print("| 9.

Visualize preparation time flavor: sweet/spicy wise |")

print("| 10.Visualize preparation time diet: vegetarian/non vegetarian wise |")

print("| 11.Exit |")

print(" ")
ch1=int(input("Enteryourchoice1-11")) if

(ch1==1):

ab=IndianFood.state

cd=IndianFood.cook_time

plt.title("CookingTimeofIndiandishes")

plt.xlabel("Indian States")

plt.ylabel("Cooking Time")

plt.xticks(rotation=30)

plt.grid(True)

print(" ")

print("|1.LineChart|")

print("|2.BarChart|")

print(" ")

print("Select the type of chart")

type=int(input("Enterchoice1-2")) if

(type==1):

plt.plot(ab,cd,label="cook_time")

plt.show()

elif (type==2):

plt.bar(ab,cd,label="cook_time")
plt.show()

else:

print("Invalidchoice")

elif (ch1==2):

ab=IndianFood.region

cd=IndianFood.cook_time

plt.title("CookingTimeofIndiandishes")

plt.xlabel("Regions")

plt.ylabel("CookingTime")

plt.xticks(rotation=30)

plt.grid(True)

print(" ")

print("|1.LineChart|")

print("|2.BarChart|")

print(" ")

print("Select the type of chart")

type=int(input("Enterchoice1-2")) if

(type==1):

plt.plot(ab,cd,label="cook_time")

plt.show()

elif(type==2):
plt.bar(ab,cd,label="cook_time")

plt.show()

else:

print("Invalidchoice")

elif (ch1==3):

ab=IndianFood.course

cd=IndianFood.cook_time

plt.title("CookingTimeofIndiandishes")

plt.xlabel("Course")

plt.ylabel("CookingTime")

plt.xticks(rotation=30)

plt.grid(True)

print(" ")

print("|1.LineChart|")

print("|2.BarChart|")

print(" ")

print("Select the type of chart")

type=int(input("Enterchoice1-2")) if

(type==1):

plt.plot(ab,cd,label="cook_time")
plt.show()

elif(type==2):

plt.bar(ab,cd,label="cook_time")

plt.show()

else:

print("Invalidchoice")

elif (ch1==4):

ab=IndianFood.flavor_profile

cd=IndianFood.cook_time

plt.title("CookingTimeofIndiandishes")

plt.xlabel("Flavors")

plt.ylabel("CookingTime")

plt.xticks(rotation=30)

plt.grid(True)

print(" ")

print("|1.LineChart|")

print("|2.BarChart|")

print(" ")

print("Select the type of chart")

type=int(input("Enterchoice1-2")) if

(type==1):
plt.plot(ab,cd,label="cook_time")

plt.show()

elif (type==2):

plt.bar(ab,cd,label="cook_time")

plt.show()

else:

print("Invalidchoice")

elif (ch1==5):

ab=IndianFood.diet

cd=IndianFood.cook_time

plt.title("CookingTimeofIndiandishes")

plt.xlabel("Diet")

plt.ylabel("CookingTime")

plt.xticks(rotation=30)

plt.grid(True)

print(" ")

print("|1.LineChart|")

print("|2.BarChart|")

print(" ")

print("Select the type of chart")

type=int(input("Enterchoice1-2"))
if (type==1):

plt.plot(ab,cd,label="cook_time")

plt.show()

elif (type==2):

plt.bar(ab,cd,label="cook_time")

plt.show()

else:

print("Invalidchoice")

elif (ch1==6):

ab=IndianFood.state

cd=IndianFood.prep_time

plt.title("PreparationTimeofIndiandishes")

plt.xlabel("Indian States")

plt.ylabel("Preparation Time")

plt.xticks(rotation=30)

plt.grid(True)

print(" ")

print("|1.LineChart|")

print("|2.BarChart|")

print(" ")
print("Select the type of chart")

type=int(input("Enterchoice1-2")) if

(type==1):

plt.plot(ab,cd,label="prep_time")

plt.show()

elif (type==2):

plt.bar(ab,cd,label="prep_time")

plt.show()

else:

print("Invalidchoice")

elif (ch1==7):

ab=IndianFood.region

cd=IndianFood.prep_time

plt.title("PreparationTimeofIndiandishes")

plt.xlabel("Regions")

plt.ylabel("PreparationTime")

plt.xticks(rotation=30)

plt.grid(True)

print(" ")

print("|1.LineChart |")
print("| 2. Bar Chart |")

print(" ")

print("Select the type of chart")

type=int(input("Enterchoice1-2")) if

(type==1):

plt.plot(ab,cd,label="prep_time")

plt.show()

elif (type==2):

plt.bar(ab,cd,label="prep_time")

plt.show()

else:

print("Invalidchoice")

elif (ch1==8):

ab=IndianFood.course

cd=IndianFood.prep_time

plt.title("PreparationTimeofIndiandishes")

plt.xlabel("Course")

plt.ylabel("PreparationTime")

plt.xticks(rotation=30)

plt.grid(True)

print(" ")
print("|1.LineChart|")

print("|2.BarChart|")

print(" ")

print("Select the type of chart")

type=int(input("Enterchoice1-2")) if

(type==1):

plt.plot(ab,cd,label="prep_time")

plt.show()

elif (type==2):

plt.bar(ab,cd,label="prep_time")

plt.show()

else:

print("Invalidchoice")

elif (ch1==9):

ab=IndianFood.flavor_profile

cd=IndianFood.prep_time

plt.title("PreparationTimeofIndiandishes")

plt.xlabel("Flavors")

plt.ylabel("PreparationTime")

plt.xticks(rotation=30)

plt.grid(True)
print(" ")

print("|1.LineChart|")

print("|2.BarChart|")

print(" ")

print("Select the type of chart")

type=int(input("Enterchoice1-2")) if

(type==1):

plt.plot(ab,cd,label="prep_time")

plt.show()

elif (type==2):

plt.bar(ab,cd,label="prep_time")

plt.show()

else:

print("Invalidchoice")

elif (ch1==10):

ab=IndianFood.diet

cd=IndianFood.prep_time

plt.title("PreparationTimeofIndiandishes")

plt.xlabel("Diet")

plt.ylabel("PreparationTime")

plt.xticks(rotation=30)
plt.grid(True)

print(" ")

print("|1.LineChart|")

print("|2.BarChart|")

print(" ")

print("Select the type of chart")

type=int(input("Enterchoice1-2")) if

(type==1):

plt.plot(ab,cd,label="prep_time")

plt.show()

elif (type==2):

plt.bar(ab,cd,label="prep_time")

plt.show()

else:

print("Invalidchoice")

else:

break

elif (ch==6):

while(True):

print(" ")

print("| DataAnalysisMenu |")


print("| 1. State wise(any Indian state) analysis |")

print("| 2. Region: East/West/North/South wise analysis |")

print("| 3. Course: dessert/main course/starter/snack wise analysis |")

print("| 4. Diet: vegetarian/non vegetarian wise analysis |")

print("| 5. Flavor: sweet/spicy wise analysis |")

print("|6.Exit |")

print(" ")

ch1=int(input("Enteryourchoice1-6")) if

(ch1==1):

stat=input("EnterState")

print(" ")

print("| 1. Minimum Cooking Time |")

print("| 2. Maximum Cooking Time |")

print("| 3. Count Number of Food Items |")

print(" ")

ch2=int(input("Enterchoice"))

if (ch2==1):

k=IndianFood.loc[IndianFood['state']==stat].cook_time

print(min(k))

elif (ch2==2):

k=IndianFood.loc[IndianFood['state']==stat].cook_time
print(max(k))

elif (ch2==3):

k=IndianFood.loc[IndianFood['state']==stat].index

print(len(k))

else:

print("Invalidchoice")

elif (ch1==2):

regi=input("EnterRegion")

print(" ")

print("|1.MinimumCookingTime |")print("|

2. Maximum Cooking Time |")

print("| 3. Count Number of Food Items |")

print(" ")

ch2=int(input("Enterchoice"))

if (ch2==1):

k=IndianFood.loc[IndianFood['region']==regi].cook_time

print(min(k))

elif (ch2==2):

k=IndianFood.loc[IndianFood['region']==regi].cook_time

print(max(k))

elif(ch2==3):
k=IndianFood.loc[IndianFood['region']==regi].index

print(len(k))

else:

print("Invalidchoice")

elif (ch1==3):

cour=input("EnterCourse")

print(" ")

print("| 1. Minimum Cooking Time |")

print("| 2. Maximum Cooking Time |")

print("| 3. Count Number of Food Items |")

print(" ")

ch2=int(input("Enterchoice"))

if (ch2==1):

k=IndianFood.loc[IndianFood['course']==cour].cook_time

print(min(k))

elif (ch2==2):

k=IndianFood.loc[IndianFood['course']==cour].cook_time

print(max(k))

elif (ch2==3):

k=IndianFood.loc[IndianFood['course']==cour].index

print(len(k))
else:

print("Invalidchoice")

elif (ch1==4):

die=input("EnterDiet")

print(" ")

print("| 1. Minimum Cooking Time |")

print("| 2. Maximum Cooking Time |")

print("| 3. Count Number of Food Items |")

print(" ")

ch2=int(input("Enterchoice"))

if (ch2==1):

k=IndianFood.loc[IndianFood['diet']==die].cook_time

print(min(k))

elif (ch2==2):

k=IndianFood.loc[IndianFood['diet']==die].cook_time

print(max(k))

elif (ch2==3):

k=IndianFood.loc[IndianFood['diet']==die].index

print(len(k))

else:
print("Invalidchoice")

elif (ch1==5):

flavor=input("EnterFlavor")

print(" ")

print("| 1. Minimum Cooking Time |")

print("| 2. Maximum Cooking Time |")

print("| 3. Count Number of Food Items |")

print(" ")

ch2=int(input("Enterchoice"))

if (ch2==1):

k=IndianFood.loc[IndianFood['flavor_profile']==flavor].cook_time

print(min(k))

elif (ch2==2):

k=IndianFood.loc[IndianFood['flavor_profile']==flavor].cook_time

print(max(k))

elif (ch2==3):

k=IndianFood.loc[IndianFood['flavor_profile']==flavor].index

print(len(k))

else:

print("Invalidchoice")

else:
break

else:

print("aaaa")

break

rep=input("Doyouwanttostorethechangesdonepermanentlyy/n")

if (rep=="y" or rep=="Y"):

IndianFood.to_csv("IndianFood.csv")

print("Changessavedpermanently")

else:

print("Changesnotsaved")
OUTPUTSCREENSHOTS
.

You might also like