0% found this document useful (0 votes)
12 views

csc.project class 12

Uploaded by

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

csc.project class 12

Uploaded by

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

VANI VIDYALAYA SENIOR SECONDARY AND JUNIOR COLLEGE

ACADEMIC YEAR : 2024-25

AIR TICKET RESERVATION

ROLL NO :

NAME : S. ANBUSELVAN

CLASS & SEC : XII ‘A’

SUBJECT : COMPUTER SCIENCE

SUB CODE : 083


TABLE OF CONTENTS

SLNO DESCRIPTION PAGE NO

01 ACKNOWLEDGEMENT 01

02 INTRODUCTION TO PYTHON 02

03 OBJECTIVES OF THE PROJECT 03

HARDWARE AND SOFTWARE REQUIREMENTS


04 04

05 DATABASE , TABLE & FUNCTIONS USED 05

06 SOURCE CODES 06

07 OUTPUTS 17

08 BIBLIOGRAPHY 19
ACKNOWLEDGEMENT

Apart from my efforts, 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.

I express a deep sense of gratitude to almighty God for giving me


strength for the successful completion of the project.

I express my heartfelt gratitude to my Parents for constant encouragement


while carrying out this project.

I gratefully acknowledge the contribution of the individuals who


contributed in bringing this project up to this level, who continues to look after
me despite my flaws,

I express my deep sense of gratitude to The Principal Ms.A.Vidhyavathi


who has been continuously motivating and extending their helping hand to us.

I express my sincere thanks to Ms.Akila.K, our Computer Science


Teacher for constant encouragement and the guidance provided during this
project

The guidance and support received from all the members who contributed
and who are contributing to this project, was vital for the success of the project.
I am grateful for their constant support and help.
INTRODUCTION TO PYTHON
Python is a dynamic, interpreted ( byte code-compiled) language.
There are no type declarations of variable, parameters, functions or
methods in the source code. This makes the code short and flexible
and you lose the compile time type checking of the source code.
Python tracks the types of all values at runtime and flags code that
does not make sense as it runs.
 Python was designed for readability and has some similarities to
the English Language with influence from mathematics.
 Python uses new line to complete a command as opposed to
other programming languages which often use semicolons or
parentheses.
 Python relies on indentation using whitespace to define scope;
such as the scope of loops, functions, and classes. Other
programming languages often use curly brackets for this
purpose.
Advantages of Python
1. Easy to Read, Learn and Write.
2. Improved Productivity
3. Interpreted Language.
4. Free and Open – Source.
5. Vast Libraries Support.
6. Portability
Disadvantages of Python
1. Slow Speed
2. Not Memory Efficient
3. Weak in Mobile Computing.
4. Run Time errors.
AIR TICKET RESERVATION
OBJECTIVES OF PROJECT

The main objective of the python project on Air ticket


reservation is to manage the details of booking, payments,
seats, and flights.
The project is totally built at administrative end and only
administrator is guaranteed the access.
The purpose of the project is to build an application program
to reduce the manual work for managing the booking,
discounts, seats, and payments.
It tracks all the details about seats, flight, and payments; it
also prints various reports as per input given by the user.

INPUT DATA AND VALIDATION OF PROJECT


1. All the fields such as flight payments discounts are
validated and does not take invalid values.
2. Each form of sales, discounts, bookings cannot accept
the blank values.
3. Avoiding errors in data.
4. Controlling amount of input.
HARDWARE AND SOFTWARE REQUIREMENTS

I. OPERATING SYSTEM : WINDOWS 7 AND ABOVE

II. PROCESSOR : PENTIUM(ANY)

III. MOTHERBOARD : 1.845 OR 915,995 FOR PENTIUM

IV. RAM : 512MB+

V. Hard disk : 40 GB OR ABOVE

SOFTWARE REQUIREMENTS:

• Windows OS
• Python
DATABASE , TABLE & FUNCTIONS USED

DBMS: MySQL
Host: local host
User: root
Pass: root
Database: hotel
Table Structure: (Images Bellow)
SOURCE CODES

importos

import platform

importmysql.connector

import pandas as pd

importdatetime

mydb = mysql.connector.connect(user='root', password='12345',

host='localhost',

database='air')

mycursor=mydb.cursor()

defregistercust():

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)"

mycursor.execute(sql,cust)

mydb.commit()

defclasstypeview():

print("Do you want to see class type available : Enter 1 for yes :")

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

ifch==1:

sql="select * from classtype"

mycursor.execute(sql)

rows=mycursor.fetchall()

for x in rows:

print(x)

defticketprice():

print ("We have the following rooms for you:-")

print ("1. type First class---->rs 6000 PN\-")

print ("2. type Business class---->rs 4000 PN\-")


print ("3. type Economy class---->rs 2000 PN\-")

x=int(input("Enter Your Choice Please->"))

n=int(input("No of passenger:"))

if(x==1):

print ("you have opted First class")

s=6000*n

elif (x==2):

print ("you have opted Business class")

s=4000*n

elif (x==3):

print ("you have opted Economy class")

s=2000*n

else:

print ("please choose a class type")

print ("your room rent is =",s,"\n")

defmenuview():

print("Do yoy want to see menu available : Enter 1 for yes :")

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

ifch==1:

sql="select * from food"

mycursor.execute(sql)
rows=mycursor.fetchall()

for x in rows:

print(x)

deforderitem():

global s

print("Do yoy want to see menu available : Enter 1 for yes :")

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

ifch==1:

sql="select * from food"

mycursor.execute(sql)

rows=mycursor.fetchall()

for x in rows:

print(x)

print("do you want to purchase from above list:enter your choice:")

d=int(input("enter your choice:"))

if(d==1):

print("you have ordered tea")

a=int(input("enter quantity"))

s=10*a
print("your amount for tea is :",s,"\n")

elif (d==2):

print("you have ordered coffee")

a=int(input("enter quantity"))

s=10*a

print("your amount for coffee is :",s,"\n")

elif(d==3):

print("you have ordered colddrink")

a=int(input("enter quantity"))

s=20*a

print("your amount for colddrink is :",s,"\n")

elif(d==4):

print("you have ordered samosa")

a=int(input("enter quantity"))

s=10*a

print("your amount fopr samosa is :",s,"\n")

elif(d==5):

print("you have ordered sandwich")

a=int(input("enter quantity"))

s=50*a

print("your amount fopr sandwich is :",s,"\n")


elif(d==6):

print("you have ordered dhokla")

a=int(input("enter quantity"))

s=30*a

print("your amount for dhokla is :",s,"\n")

elif(d==7):

print("you have ordered kachori")

a=int(input("enter quantity"))

s=10*a

print("your amount for kachori is :",s,"\n")

elif(d==8):

print("you have ordered milk")

a=int(input("enter quantity"))

s=20*a

print("your amount for kachori is :",s,"\n")

elif(d==9):

print("you have ordered noodles")

a=int(input("enter quantity"))

s=50*a

print("your amount for noodles is :",s,"\n")

elif(d==10):
print("you have ordered pasta")

a=int(input("enter quantity"))

s=50*a

print("your amount for pasta is :",s,"\n")

else:

Print("please enter your choice from the menu")

deflugagebill():

global z

print("Do yoy want to see rate for lugage : Enter 1 for yes :")

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

ifch==1:

sql="select * from lugage"

mycursor.execute(sql)

rows=mycursor.fetchall()

for x in rows:

print(x)

y=int(input("Enter Your weight of extra lugage->"))

z=y*1000

print("your laundarybill:",z,"\n")

return z

def lb():
print(z)

def res():

print(s)

defticketamount():

a=input("enter customer name:")

print("customer name :",a,"\n")

print("lugage bill:")

print(lb)

print("food bill:")

print(“total amount”)

defMenuset():

print(“AIR TICKET RESERVATION”)

print("enter 1: To enter customer data")

print("enter 2 : To view class")

print("enter 3 : for ticketamount")

print("enter 4 : for viewing food menu")

print("enter 5 : for food bill")

print("enter 6 :for lugage bill")

print("enter 7 : for complete amount")

print("enter 8 : for exit")


'''try:

#userinput=int(input("pleaseselect an above option:"))

exceptValueError:

exit("\n hi thats not a number")'''

userinput=int(input("enter your choice"))

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:

print("enter correct choice")

Menuset()

defrunagain():

runagn=input("\n want to run again y/n:")

while(runagn.lower()=='y'):

if(platform.system()=="windows"):

print(os.system('cls'))

else:

print(os.system('clear'))

Menuset()

runagn=input("\n want to run again y/n:")

runagain()
OUTPUTS
BIBLIOGRAPHY

 Computer science With Python - Class XI By : SumitaArora


 WEBSITE: http://www.google.com/

***

You might also like