Flight PDF
Flight PDF
PROJECT
PROJECT TOPIC :
FLIGHT MANAGEMENT SYSTEM
CHILDREN’S
ACADEMY
Class: XII’ A
Internal Examiner
Principal
ExternalExaminer
ACKNOWLEDGMENT
It is with pleasure that I acknowledge my
sincere gratitude to our teacher,
MR. ANKIT PAPNOI SIR who taught and
undertook the responsibility of teaching the
subject computer science. I have been
greatly benefited from his classes.
I am especially indebted to our Principal
MRS. SONIA AHUJA who has always been a
source of encouragement and support
and without whose inspiration this
project would not have been a
successful I would like to place on
record heartfelt thanks to him.
Finally, I would like to express my sincere
appreciation for all the other students
for my batch their friendship & the fine
time that we all shared together
HARDWARE AND SOFTWARE
REQUIRED
HARDWARE
1. PC
2. MOBILE PHONE
SOFTWARE
• PYTHON (latest version)
• MYSQL
• PYTHON CONNECTOR
FLIGHT
The following are the main advantages:
obj=mysql.connector.connect(host="localhost",user="root",passwd="admin")
#here obj is connection object
mycursor=obj.cursor()
#________cursor is used to row by row processing of record in the
resultset
#CREATING DATABASE
Mycursor.execute(“create database if not exists airlines”)
mycursor.execute("use airlines")
#CREATING TABLE FOR ODER FOOD
mycursor.execute("create table if not exists food_items(sl_no int(4)
auto_increment primary key,food_name varchar(40)not null,price int(4) not
null)")
mycursor.execute("insert into food_items
values({},'{}',{})".format('null','pepsi',150))
mycursor.execute("insert into food_items
values({},'{}',{})".format('null','coffee',70))
mycursor.execute("insert into food_items
values({},'{}',{})".format('null','tea',50))
mycursor.execute("insert into food_items
values({},'{}',{})".format('null','water',60))
mycursor.execute("insert into food_items
values({},'{}',{})".format('null','milk shake',80))
mycursor.execute("insert into food_items
values({},'{}',{})".format('null','chicken burger',160))
mycursor.execute("insert into food_items
values({},'{}',{})".format('null','cheese pizza',70))
mycursor.execute("insert into food_items
values({},'{}',{})".format('null','chicken biryani',300))
mycursor.execute("insert into food_items
values({},'{}',{})".format('null','plane rice',80))
mycursor.execute("insert into food_items
values({},'{}',{})".format('null','aloo paratha',120))
mycursor.execute("insert into food_items
values({},'{}',{})".format('null','roti sabji',100))
mycursor.execute("insert into food_items
values({},'{}',{})".format('null','omelette',50))
obj.commit()
else:
print(" **************** PLEASE ENTER A VALID OPTION
**************************** ")
food()
obj.commit()
#TO UPDATE THE INFORMATION OF FOOD DETAILS
def food():
print("what do you want to do?")
print("1. add new items") print("2.
update price") print("3. delete
items") x=int(input("enter your
choice: "))
if x==1:
fname=input("enter food name: ")
fprice=int(input("enter food price: "))
mycursor.execute("insert into food_items
values({},'{}',{}".format('null',fname,fprice))
elif x==2:
fid=int(input("enter food id: "))
fprice=int(input("enter new price: "))
mycursor.execute("update food_items set price={} where
food_id={}".format(fid,fprice))
elif x==3:
fid=int(input("enter food id: "))
mycursor.execute("delete from food_items where where
food_id={}".format(fid))
else:
print(" **************** PLEASE ENTER A VALID OPTION
**************************** ")
food()
obj.commit()
def fooditems():
print(" ") print(" ")
print("
print(" ") THE AVAILABLE FOODS ARE: ")
print(" ")
mycursor.execute("select * from food_items")
x=mycursor.fetchall()
for i in x:
print(" FOOD ID: ",i[0])
print(" FOOD Name: ",i[1])
print(" PRICE: ",i[2])
print("__________________________________________________________________
________________________")
user()
if x==1:
print("1. classtype")
print("2. food")
print("3. luggage")
x1=int(input("enter your choice"))
if x1==1:
classtype()
elif x1==2:
food()
elif x1==3:
luggage()
else:
print(" ********************** PLEASE ENTER A VALID
OPTION ******************************** ")
admin1()
elif x==2:
print("1. classtype") print("2.
food") print("3. luggage")
print("4. records")
y=int(input("from which table: "))
if y==1:
obj.commit()
print(" ")
print(" Flight ID: ",i[0])
print(" Flight Name: ",i[1])
print(" departure: ",i[2])
print(" Destination: ",i[3])
print(" Take off Day: ",i[4])
print(" Take off time : ",i[5])
print(" bussiness : ",i[6])
print(" middle : ",i[7])
print(" economic : ",i[8])
print("__________________________________________________________________
________________________")
user()
#USER INTERFACE
def user():
while True:
print("************** MAY I HELP YOU? *****************")
print("1. flight details")
print("2. food details")
print("3. book ticket")
print("4. my details")
print("5. exit")
x=int(input("enter your choice: "))
if x==1:
flightavailable()
elif x==2:
fooditems()
elif x==3:
ticketbooking()
elif x==4:
records()
else:
print("************ PLEASE CHOOSE A CORRECT OPTION
************")
user()
break
#Main Interface
def menu1():
*******************")
print("**************** prYiOnUtR( "D1E.SIGNATION?
admin") print("2. user") print("3.
exit") x=int(input("choose a
option: ")) while True:
if x==1:
admin()
elif x==2:
user()
else:
print("************PLEASE CHOOSE A CORRECT
OPTION******************")
menu1()
break
menu1()
#mysql
• Tables in database airlines:
• www.google.com
• www.wikipedia.org
• www.yahoo.com