Airlines
Airlines
Airlines
use hotel;
SOURCE CODE
import os
import platform
import mysql.connector
import pandas as pd
import datetime
global z
host='localhost',
database='air')
mycursor=mydb.cursor()
def registercust():
L=[]
name=input("enter name:")
L.append(name)
addr=input("enter address:")
L.append(addr)
L.append(jr_date)
source=input("enter source:")
L.append(source)
destination=input("enter destination:")
L.append(destination)
cust=(L)
mycursor.execute(sql,cust)
mydb.commit()
def classtypeview():
print("Do yoy want to see classs type available : Enter 1 for yes :")
if ch==1:
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
def ticketprice():
n=int(input("No of passenger:"))
if(x==1):
s=6000*n
elif (x==2):
elif (x==3):
s=2000*n
else:
def menuview():
print("Do yoy want to see menu available : Enter 1 for yes :")
if ch==1:
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
def orderitem():
global s
print("Do yoy want to see menu available : Enter 1 for yes :")
if ch==1:
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
print("do you want to purchase from above list:enter your choice:")
if(d==1):
a=int(input("enter quantity"))
s=10*a
elif (d==2):
a=int(input("enter quantity"))
s=10*a
elif(d==3):
a=int(input("enter quantity"))
s=20*a
elif(d==4):
a=int(input("enter quantity"))
s=10*a
elif(d==5):
a=int(input("enter quantity"))
s=50*a
print("your amount fopr sandwich is :",s,"\n")
elif(d==6):
a=int(input("enter quantity"))
s=30*a
elif(d==7):
a=int(input("enter quantity"))
s=10*a
elif(d==8):
a=int(input("enter quantity"))
s=20*a
elif(d==9):
a=int(input("enter quantity"))
s=50*a
elif(d==10):
a=int(input("enter quantity"))
s=50*a
else:
Print("please enter your choice from the menu")
def lugagebill():
global z
print("Do yoy want to see rate for lugage : Enter 1 for yes :")
if ch==1:
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
z=y*1000
return z
def lb():
print(z)
def res():
print(s)
def ticketamount():
print("lugage bill:")
print(lb)
print("food bill:")
print(res)
def Menuset():
'''try:
except ValueError:
if(userinput==1):
registercust()
elif(userinput==2):
classtypeview()
elif(userinput==3):
ticketprice()
elif(userinput==4):
menuview()
elif(userinput==5):
orderitem()
elif(userinput==6):
lugagebill()
elif(userinput==7):
ticketamount()
elif(userinput==8):
quit()
else:
Menuset()
def runagain():
while(runagn.lower()=='y'):
if(platform.system()=="windows"):
print(os.system('cls'))
else:
print(os.system('clear'))
Menuset()
runagain()
SUBMITTED BY
MANISHA DUBEY
PGT CS