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

Railway Reservation Project

This 3 sentence summary provides the essential information about the document: The document is a project report submitted by Benaiah Jesudin Joel J.K for their class 11 assignment on a Railway Reservation System developed using Python and MySQL. The report includes sections on the certificate, acknowledgements, introduction, source code, sample output, limitations and conclusion for the project. The source code section includes the code developed for modules like train, customer, payment and ticket for the reservation system.

Uploaded by

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

Railway Reservation Project

This 3 sentence summary provides the essential information about the document: The document is a project report submitted by Benaiah Jesudin Joel J.K for their class 11 assignment on a Railway Reservation System developed using Python and MySQL. The report includes sections on the certificate, acknowledgements, introduction, source code, sample output, limitations and conclusion for the project. The source code section includes the code developed for modules like train, customer, payment and ticket for the reservation system.

Uploaded by

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

A Project Report

Submitted By
NAME —Benaiah Jesudin Joel J.K
CLASS — 11
ROLL NO—11A003
CONTENTS

S.No Topic Name Page No.


1 Certificate 3
2 Acknowledgement 4
3 Introduction 5
4 Source code 6– 9

5 Sample Output 10
6 Limitation of the Project 11
7 Conclusion 12
CERTIFICATE

This is to certify that the project titled, “Railway Reservation System" is a piece

of work done by Benaiah Jesudin Joel J.Kclass XI Session 2022-23 in Partial

fulfilment of CBSE'SAISSCE-2020 and has been carried out under My

supervision and guidance. This report or an identical report on this topic has

not been submitted for any other examination and does not form a part of any

other course undergone by the candidate.

Signature of Teacher/Guide

Name: MR.Kaliraj MSc.,M.Ed.,M.Phill

Designation: PGT (Computer Science)

Date: 18/01 /2023


ACKNOWLEDGEMENT

I am deeply indebted to my guide MR.Kaliraj for his valuable guidance,


stimulus and constructive criticism during the whole span of this
project work. I am also grateful to him for his continuous support and
encouragement during the Course of present work. I am also grateful to
him as he cleared all my doubts related with MySQL-Python Interface and
Python in particular.

I am thankful to my friends and classmates as they have always helped


me with heart in many ways. This is incomplete unless I say thanks to my
parents, whose important time I used for everything.

Signature of Student

Name: Benaiah Jesudin Joel J.K

Class & Section:XI-A

Date:18/01/2023
INTRODUCTION

Railway Reservation System is a python based project. We have developed Railway


Reservation System using Python Django and MySQL. The main modules available
in this project are Train module which manages the functionality of Train, Train
Route is normally used for managing Train Route, Customer contains all
the functionality realted to Customer, Payment manages the Payment
functionality, Train Schedule has all the features of Train Schedule and
Ticket module manages the functionality of Ticket.

Name of databases: Project


def menu():

print('1.YES')

print('2.NO')

ch=int(input('DO YOU WANT TO CONTINUE OR NOT:'))

while ch==1:

print('WELECOME TO ONLINE RAILWAY RESERVATION SYSTEM')

print('1.SIGN IN')

print('2.SIGN UP')

print('3.DELETE ACCOUNT')

print('4.EXIT')

ch1=int(input('ENTER YOUR CHOICE:'))

if ch1==1:

a=checking()

if a==True:

print('WELCOME')

main()

else:

continue

elif ch1==2:

a=checking_1()

if a==True:

main()

else:

print('PASSWORD ALREADY EXISTS')

continue

elif ch1==3:
c=checking_2()

if c==True:

print('ACCOUNT DELETED')

continue

else:

print('YOUR PASSWAORD OR USER_NAME IS INCORRECT')

continue

elif ch1==4:

print('THANK YOU')

break

else:

print('ERROR 404:PAGE NOT FOUND')

break

def main():

print('1.yes')

print('2.no')

c=int(input("do you want to continue or not:"))

while (c==1):

print(' 1.TICKET BOOKING',"\n", '2.TICKET CHECKING',"\n",'3.TICKET

CANCELLING',"\n",'4.ACCOUNT DETAILS',"\n",'5.LOG OUT')

ch=int(input('enter ur choice:'))

if ch==1:

ticket_booking()

elif ch==2:

ticket_checking()

elif ch==3:

ticket_cancelling()

elif ch==4:
checking_3()

elif ch==5:

print('THANK YOU')

break

else:

print('WRONG INPUT')

else:

print('ERROR 404: ERROR PAGE NOT FOUND')

def ticket_booking():

import mysql.connector

mycon=mysql.connector.connect(host='localhost',user='root',passwd='manager',database='railway')

cursor=mycon.cursor()

mycon.autocommit=True

nm=input('enter your name:')

phno=input('enter your phone number:')

age=int(input('enter your age:'))

print(' M=MALE','\n','F=FEMALE','\n','N=NOT TO MENTION')

gender=input('enter your gender:')

Gender=gender.upper()

fr=input('enter ur starting point:')

to=input('enter your destination:')

date1=input('enter date(dd):')

date2=input('enter month(mm):')

date3=input('enter year(yyyy):')

date=date1+"/"+date2+"/"+date3

a={'M':'MALE','F':'FEMALE','N':'NOT TO MENTION'}

v=a[Gender]

s1="insert into railway values('{}',{},{},'{}','{}','{}','{}')".format(nm,phno,age,v,fr,to,date)

cursor.execute(s1)

print('BOOKED SUCCESSFULLY')
def ticket_checking():

import mysql.connector

mycon=mysql.connector.connect(host='localhost',user='root',passwd='manager',database='railway')

cursor=mycon.cursor()

mycon.autocommit=True

print('1.yes')

print('2.no')

ch=int(input("do you want to continue or not:"))

if ch==1:

phno=int(input('enter your phnone number:'))

try:

s1="select * from railway where phno=phno"

cursor.execute(s1)

data=cursor.fetchall()[0]

Data=list(data)

a=['NAME','PHONE NUMBER','AGE','GENDER','STARTING POINT','DESTINATION','DATE',]

print(a[0],'::::',Data[0].upper())

print(a[1],'::::',Data[1])

print(a[2],'::::',Data[2])

print(a[3],'::::',Data[3].upper())

print(a[4],'::::',Data[4].upper())

print(a[5],'::::',Data[5].upper())

print(a[6],'::::',Data[6])

except:

print('TICKET DOES NOT EXISTS')

elif ch==2:

print('THANK YOU')

else:

print('ERROR 404:PAGE NOT FOUND')


def ticket_cancelling():

import mysql.connector

mycon=mysql.connector.connect(host='localhost',user='root',passwd='manager',database='railway')

cursor=mycon.cursor()

mycon.autocommit=True

print('1.yes')

print('2.no')

ch=int(input("do you want to continue or not:"))

if ch==1:

phno=input('enter your phone number:')

s1="delete from railway where phno=phno"

cursor.execute(s1)

print('TICKET CANCELLED')

elif ch==2:

print('THANK YOU')

else:

print('ERROR 404:PAGE NOT FOUND')

def checking_2():

import mysql.connector

mycon=mysql.connector.connect(host='localhost',user='root',passwd='manager',database='railway')

cursor=mycon.cursor()

mycon.autocommit=True

a=input('USER NAME:')

b=input('PASS WORD:')

try:

s1="select user_name from user_accounts where password='{}'".format(b)

cursor.execute(s1)

data=cursor.fetchall()[0]

data=list(data)
if data[0]==a:

print('IS THIS YOUR ACCOUNT')

s1="select user_name from user_accounts where password='{}'".format(b)

c1="select fname,lname from user_accounts where password='{}'".format(b)

cursor.execute(c1)

data1=cursor.fetchall()[0]

data1=list(data1)

data1=data1[0]+' '+data1[1]

cursor.execute(s1)

data=cursor.fetchall()[0]

data=list(data)

if data[0]==a:

x=['FIRST NAME','LAST NAME','PHONE NUMBER','GENDER','DATE OF BIRTH','AGE']

s1="select fname,lname,phno,gender,dob,age from user_accounts where

password='{}'".format(b)

cursor.execute(s1)

data=cursor.fetchall()[0]

data=list(data)

print(x[0],':::',data[0])

print(x[1],':::',data[1])

print(x[2],':::',data[2])

print(x[3],':::',data[3])

print(x[4],':::',data[4])

print(x[5],':::',data[5])

print('1.yes')

print('2.no')

vi=int(input('enter your choice:'))

if vi==1:

b1="delete from user_accounts where password = '{}'".format(b)


cursor.execute(b1)

return True

elif vi==2:

print('SORRY,RETRY')

else:

print('ERROR 404:PAGE NOT FOUND')

else:

return False

except:

print('ACCOUNT DOES NOT EXIST')

def checking_1():

import mysql.connector

mycon=mysql.connector.connect(host='localhost',user='root',passwd='manager',database='railway')

cursor=mycon.cursor()

mycon.autocommit=True

f=input("FIRST NAME:")

l=input("LAST NAME:")

n=f+" "+l

a=input('USER NAME:')

b=input('PASS WORD:')

c=input('RE-ENTER YOUR PASS WORD:')

ph=input("PHONE NUMBER:")

print(' M=MALE','\n','F=FEMALE','\n','N=NOT TO MENTION')

gen=input('ENTER YOUR GENDER:')

print("ENTER YOR DATE OF BIRTH")

d=input("DD:")

o=input("MM:")
p=input("YYYY:")

dob=d+'/'+o+'/'+p

age=input('YOUR AGE:')

v={'m':'MALE','f':'FEMALE','n':'NOT TO MENTION'}

if b==c:

try:

c1="insert into user_accounts values('{}','{}','{}','{}','{}','{}','{}','{}')".format(f,l,a,b,ph,v[gen],dob,age)

cursor.execute(c1)

print('WELCOME',f,' ',l)

return True

except:

print('PASSWORD ALREADY EXISTS')

return False

else:

print('BOTH PASSWORDS ARE NOT MATCHING')

def checking():

import mysql.connector

mycon=mysql.connector.connect(host='localhost',user='root',passwd='manager',database='railway')

cursor=mycon.cursor()

mycon.autocommit=True

a=input('USER NAME:')

b=input('PASS WORD:')

try:

s1="select user_name from user_accounts where password='{}'".format(b)

c1="select fname,lname from user_accounts where password='{}'".format(b)

cursor.execute(c1)

data1=cursor.fetchall()[0]
data1=list(data1)

data1=data1[0]+' '+data1[1]

cursor.execute(s1)

data=cursor.fetchall()[0]

data=list(data)[0]

if data==a:

print(' HII ',data1)

return True

else:

return False

except:

print('ACCOUNT DOES NOT EXIST')

def checking_3():

import mysql.connector

mycon=mysql.connector.connect(host='localhost',user='root',passwd='manager',database='railway')

cursor=mycon.cursor()

mycon.autocommit=True

a=input('USER NAME:')

b=input('PASS WORD:')

try:

s1="select user_name from user_accounts where password='{}'".format(b)

c1="select fname,lname from user_accounts where password='{}'".format(b)

cursor.execute(c1)

data1=cursor.fetchall()[0]

data1=list(data1)

data1=data1[0]+' '+data1[1]

cursor.execute(s1)

data=cursor.fetchall()[0]

data=list(data)
if data[0]==a:

x=['FIRST NAME','LAST NAME','PHONE NUMBER','GENDER','DATE OF BIRTH','AGE']

s1="select fname,lname,phno,gender,dob,age from user_accounts where password='{}'".format(b)

cursor.execute(s1)

data=cursor.fetchall()[0]

data=list(data)

print(x[0],':::',data[0])

print(x[1],':::',data[1])

print(x[2],':::',data[2])

print(x[3],':::',data[3])

print(x[4],':::',data[4])

print(x[5],':::',data[5])

else:

return False

except:

print('ACCOUNT DOES NOT EXIST')

menu()
1.YES
2.NO
DO YOU WANT TO CONTINUE OR NOT:1
WELECOME TO ONLINE RAILWAY RESERVATION SYSTEM
1.SIGN IN
2.SIGN UP
3.DELETE ACCOUNT
4.EXIT
ENTER YOUR CHOICE:1
WELCOME
1.yes
2.no
do you want to continue or not:1
1.TICKET BOOKING
2.TICKET CHECKING
3.TICKET CANCELLING
4.ACCOUNT DETAILS
5.LOG OUT
enter your choice:2
1.yes
2.no
do you want to continue or not:1
enter your phone number:9788640693
NAME:Benaiah
PHONE NUMBER:9788640693
AGE:16
GENDER:MALE
STARTING POINT:SATTUR
DESTINATION:CHENNAI EGMORE
DATE:31/01/2023
THANK YOU
LIMITATIONS

 Excel export has not been developed for Customers,


Stations due to some criticality.

 The transactions are executed in off-line mode, hence on-


line data for Booking, Timetable capture and modification
is not possible.

 Off-line reports of Booking, Trains, Fare cannot be


generated due to batch mode execution.,
CONCLUSIONS

The main objective of the Python Project on Railway Ticket


Reservation system is to manage the details of Booking,
Timetable, Trains, Stations, Fare. It manages all the information
about Booking, Customers, Fare, Booking.

The project is totally built at administrative end and thus only


the 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, Timetable, Customers, Trains.

It tracks all the details about the Trains, Stations, Fare.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy