Rajs Cs Projectclas 12
Rajs Cs Projectclas 12
Submitted By:
Raj Chauhan
Class: XIIth D
Roll No: 31
1
CONTENTS
..............................
Signature of Teacher/Guide
Name: Mrs. Nidhi Shinde
Designation: PGT (Computer Science)
I would like to extend my gratitude to the Principal Rev. Fr. Savariraj and Headmistress
Sr. Carmen for providing me with all the facility that was required.
I would also like to express my gratitude to my guide Mrs. Nidhi Shinde for her able
guidance and support in completing my project.
Last but not the least I would like to thank my parents and friends who helped me a lot.
…………………………
Signature of Student
Name: RAJ CHAUHAN
Class & Section:
PAGE 4
INTRODUCTION
It so happened that one day I went to RAILWAY STATION.
I noticed that the manager was much tensed. On being
enquired by me, he told me that everything in the RAILWAY
STATION was messed up. He told me that keeping records of
the passenger manually was extremely difficult.
At that time I got the idea of designing handy and easy to use
software so that I could help the manager. This program
provides all required facilities. It provides the facility to keep
the records of passenger in a much easier and efficient way.
With the help of large database. So I developed “RAILWAY
RESERVATION”
And it has made the whole work more systematic and
organized
PAGE 5
FRONT-END: Python
BACK END: CSV File/Binary File/MySQL
Project Coding
RAILWAY RESERVATION:
mycursor=mydb.cursor()
print(res)
def railresmenu():
if(n==1):
traindetail()
elif(n==2):
reservation()
elif(n==3):
cancel()
elif(n==4):
displayPNR()
elif(n==5):
exit(0)
else:
print("wrong choice")
def traindetail():
print("Train Details") ch='y'
while (ch=='y'):
l=[]
name=input("enter train name :") l.append(name)
tnum=int(input("enter train number :"))
l.append(tnum)
ac1=int(input("enter number of AC 1 class
seats"))
l.append(ac1)
ac2=int (input("enter number of AC 2class seats”))
l.append(ac2)
ac3=int (input("enter number of AC 3 class seats”))
l.append(ac3)
slp=int(input("enter number of sleeper
seats")
l.append(slp)
train=(l)
sql="insert traindetail(tname,tnum,ac1,ac2,ac3,slp)
values(%s,%s,%s,%s,%s,%s)"
mycursor.execute(sql,train)
mydb.commit()
print("insertion completed")
print("Do you want to insert more train
Detail")
ch=input(“enter yes/no”)
print(‘\n’*10)
print("==========================================
=====
====================") railresmenu()
def reservation():
global pnr l1=[]
pname=input("enter passenger name=") l1.append(pname)
age=input("enter age of passenger
=") l1.append(age)
trainno=input("enter train number")
l1.append(trainno) np=int(input("Enter number of
passanger:")1.append(np)
print("select a class you would like to travel in")
print("1.AC FIRST CLASS") print("2.AC
SECOND CLASS") print("3.AC THIRD
CLASS")
print("4.SLEEPER CLASS")
cp=int(input("Enter your choice:")) if(cp==1):
amount=np*1000
cls='ac1'
elif(cp==2):
amount=np*80
0 cls='ac2'
elif(cp==3):
amount=np*50
0 cls='ac3'
else:
amount=np*35
0 cls='slp'
l1.append(cls) print("Total amount to be paid:",amount)
l1.append(amount) pnr=pnr+1
print("PNR Number:",pnr) print("status:
confirmed") sts='conf'
l1.append(sts
)
l1.append(pnr)
train1=(l1)
sql=”insert
passengers(pname,age,trainno,noofpas,cls,amt,status,pnrno)
values(%s,%s,%s,%s,%s,%s,%s,%s)"
mycursor.execute(sql,train 1)
mydb.commit()
print("insertion completed")
print("Go back to menu")
print('\n' *10)
print("==========================================
=====
====================") railresmenu()
railresmenu()
def cancel():
print("Ticket cancel window")
pnr=input("enter PNR for cancellation of Ticket") pn=(pnr,)
sql="update passengers set status='deleted'
where pnrno=%s"
mycursor.execute(sql,pn)
mydb.commit()
print("Deletion completed")
print("Go back to menu")
print('\n' *10)
print("==========================================
=====
====================")
railresmenu( )
passengers(pname,age,trainno,noofpas,cls,amt,status,pnrno)
values(%s,%s,%s,%s,%s,%s,%s,%s)"
mycursor.execute(sql,train1)
mydb.commit()
print("insertion completed")
print("Go back to menu")
print('\n' *10)
print("==========================================
=====
====================") railresmenu()
railresmenu()
def cancel():
print("Ticket cancel window")
pnr=input("enter PNR for cancellation of Ticket")
pn=(pnr,)
sql="update passengers set status='deleted'
where pnrno=%s"
mycursor.execute(sql,pn)
mydb.commit()
print("Deletion completed")
print("Go back to menu")
print('\n' *10)
print("==========================================
=====
====================")
railresmenu()
def displayPNR():
print("PNR STATUS window") pnr=input("enter
PNR NUMBER") pn=(pnr,)
sql="select * from passengers where pnrno=%s"
mycursor.execute(sql,pn)
res=mycursor.fetchall()
#mydb.commit()
print("PNR STATUS are as follows : ") print("(pname,age,trainno,
noofpas,cls,amt,status,
pnrno)"
for x in res:
print(x)
#print("Deletion completed")
print("Go back to menu")
print('\n' *10)
print("========================================== =====
====================") railresmenu()
railresmenu()
19
CONCLUSION AND SUMMARY
20
LIMITATIONS OF THE PROJECT
1. Scalability Issues
Description: The system may not efficiently handle a large number of simultaneous users,
particularly during peak booking seasons or special events.
Impact: Can lead to slow responses or system crashes, negatively affecting user experience.
Description: Storing sensitive user information such as personal details and payment data
requires robust security measures.
Impact: If security is compromised, it could lead to data breaches and loss of user trust.
4. System Downtime
Description: Scheduled maintenance or unexpected server failures can render the system
temporarily inaccessible.
Impact: Could disrupt user bookings and cause dissatisfaction.
Description: The system relies on real-time updates for seat availability, train schedules, and
cancellations.
Impact: Delayed updates may lead to booking errors or inconvenience for travelers.
21
BIBLOGRAPHY
In making the project I took the help of
following sources of information:
Textbook in PYTHON
Mrs.Nidhi shinde
22
23