CS Project Vaishakh
CS Project Vaishakh
VIDYALAYA KASARAGOD
REG NO :
NAME : NIBHIN T K
CLASS : XII A
PGT IT
Date :
Principal
ACKNOWLEDGEMENT
Apart from the efforts of me, the success of any project depends largely
on the encouragement and guidelines of many others. I take this
opportunity to express my gratitude to the people who have been
instrumental in the successful completion of this project.
SNO DESCRIPTION
1 BRIEF OVERVIEW
SOFTWARE AND HARDWARE
2 REQUIREMENTS
3 NEED OF
COMPUTERISATION
4 ADVANTAGES AND
LIMITATIONS
5 PYTHON CODE
6 OUTPUT SCREENS
8 FUTURE ENHANCEMENT OF
THE PROJECT
9 BIBLIOGRAPHY
AIR TICKET RESERVATION
CHARACTERISTICS OF DBMS:
BASED ON ACCESS:
• Sequential file
• Serial file
• Random (direct access) file
BASED ON STORAGE:
• Text file
• Binary File
NEED OF
COMPUTERISATION
LIMITS
1. Excel export has not been developed for bookings.
2. The transactions are executed in offline mode only.
3. Online transactions for sales, bookings, or other data modifications
are not possible. 4. Offline reports of sales, bookings, and discounts
cannot be generated due to batch mode execution.
PYTHON CODE
import os
import platform
import pandas
import datetime
import mysql.connector
print("***** VAN AIRLINES *****")
mydb=mysql.connector.connect(user='root',password='12345',host='loca
lhost',database='Airlines')
def registercust():
l=[]
name=input("Enter name:")
l.append(name)
addr=input("Enter address:")
l.append(addr)
jr_date=input("Enter date of journey:")
l.append(jr_date)
source=input("Enter source:")
l.append(source)
destination=input("Enter destination :")
l.append(destination)
cust=(l)
sql="insert into
pdata(custname,addr,jrdate,source,destination)values(%s,%s,%s,%s,
%s)"
cursor=mydb.cursor()
cursor.execute(sql,cust)
mydb.commit()
def classtypeview():
print("Do you want to see class type available: enter 1 for yes:")
ch=int(input("Enter the choice:"))
if ch==1:
sql="select * from classtype"
cursor=mydb.cursor()
cursor.execute(sql)
rows=cursor.fetchall()
for x in rows:
print(x)
def ticketprice():
print("We have following rooms for you:-")
print("1.First class--->Rs 6000 PN\-")
print("2.Bussiness class--->Rs 4000 PN\-")
print("3.Economy class--->Rs 2000 PN\-")
x=int(input("Enter your choice please->"))
n=int(input("No of passengers:"))
if x==1:
print("you have opted First class")
v=6000*n
elif x==2:
print("you have opted Business class")
v=4000*n
elif x==3:
print("you have opted Economy class")
v=2000*n
else:
print("Please choose a class type")
print("Your room rent is =",v)
def menuview():
print("Do you want to see menu available:enter 1 for yes")
ch=int(input("Enter the choice:"))
if ch==1:
sql="select * from food"
cursor=mydb.cursor()
cursor.execute(sql)
rows=cursor.fetchall()
for x in rows:
print(x)
def orderitem():
print("Do you want to see menu available:enter 1 for yes")
ch=int(input("Enter the choice:"))
if ch==1:
sql="select * from food GROUP BY SNO"
cursor=mydb.cursor()
cursor.execute(sql)
rows=cursor.fetchall()
for x in rows:
print(x)
print("Do you want to purchase from above list:enter your choice")
d=int(input("Enter the choice:"))
global s
if d==1:
print("You have ordered Tea")
a=int(input("Enter the quantity:"))
s=120*a
print("your amount for tea is:",s)
elif d==2:
print("You have ordered MILK")
a=int(input("Enter the quantity:"))
s=100*a
print("your amount for MILK is:",s)
elif d==3:
print("You have ordered DOSA & CURRY")
a=int(input("Enter the quantity:"))
s=200*a
print("your amount for DOSA & CURRY is:",s)
elif d==4:
print("You have ordered Puttu&Kadala ")
a=int(input("Enter the quantity:"))
s=150*a
print("your amount for Puttu&Kadala is:",s)
elif d==5:
print("You have ordered MEAL")
a=int(input("Enter the quantity:"))
s=350*a
print("your amount for MEAL is:",s)
elif d==6:
print("You have ordered Pazhampori ")
a=int(input("Enter the quantity:"))
s=50*a
print("your amount for Pazhampori is:",s)
elif d==7:
print("You have ordered UPMA ")
a=int(input("Enter the quantity:"))
s=150*a
print("your amount for UPMA is:",s)
elif d==8:
print("You have ordered Zinger burger ")
a=int(input("Enter the quantity:"))
s=150*a
print("your amount for Zinger burger is:",s)
elif d==9:
print("You have ordered Tika Wrap ")
a=int(input("Enter the quantity:"))
s=200*a
print("your amount for Tika Wrap is:",s)
elif d==10:
print("You have ordered Mojito ")
a=int(input("Enter the quantity:"))
s=150*a
print("your amount for Mojito is:",s)
else:
print("Please enter your choice from menu")
def luggagebill():
global z
print("Do you want to see rate for luggage:enter 1 for yes")
ch=int(input("Enter the choice:"))
if ch==1:
mycursor = mydb.cursor()
mycursor.execute("SELECT * FROM luggage")
myresult = mycursor.fetchall()
for x in myresult:
print(x)
y=int(input("Enter your weight of extra luggage->"))
z=y*1000
print("Your luggage bill:",z)
return z
def lb():
global z
print(z)
def food():
global s
print(s)
def ticketamount():
a=input("Enter customer name:")
print("customer name:",a)
print("luggage bill:")
lb()
print("food bill:")
food()
print("total amount",s+z)
def menuset():
print("AIR TICKET RESEVATION")
print("enter 1:to enter customer data")
print("enter 2:to view class")
print("enter 3:for ticket amount")
print("enter 4:for viewing food menu")
print("enter 5:for food bill")
print("enter 6:for luggage bill")
print("enter 7:for complete amount")
print("enter 8:for exit")
menuset()
def runagain():
runagn=input("Do you wish to continue? y/n")
while(runagn.lower()=='y'):
menuset()
runagain()
OUTPUT SCREENS
SOURCE CODE SCREENING
DBMS:MYSQL
HOST:LOCAL HOST
USER:ROOT
PASSWORD:12345
DATABSE:AIRLINES
TABLE STRUCTURE:
Future enhancements
BIBLIOGRAPHY
• https://www.unicef.org/education
• https://www.google.com/
• https://en.wikipedia.org/
• https://www.geeksforgeeks.org/
• https://www.pexels.com/
• computer science with python class 12 sumita arora