Cs. Project
Cs. Project
SESSION 2022-23
1. Certificate
2. Acknowledgements
3. Declaration
4. Aim
a. Requirements
b. Bibliography
CERTIFICATE
This is to certify
that Manav,
Khushbu,
Urmila
have successfully
completed this project
report entitled
“RAILWAY RESERVATION SYSTEM”
During the academic year 2022-2023
towards partial fulfillment of
C.S. Practical
Examination
conducted by CBSE.
“ r “, for reading.
“ w “, for writing.
“ a “, for appending.
“ r+ “, for both reading and writing
1. Division of development
2. Increases readability of program
3. Programming errors can easily be detected
4. Allows reuse of code
5. Improves manageability
6. Collaboration in projects made efficient and easy.
ABOUT INDIAN RAILWAY
train.nv
def init
():
trainno=
0
no
ofac1stclass=0 no
ofac2ndclass=0
no
ofac3rdclass=0
no ofsleeper=0
totalseats=0
trainname=”
startingpt=
destination=”
def getinput():
print
(”=”*80)
print (”\t\t\t ENTER THE TRAIN DETAILS”)
print
print(”=”*80)
trainname=input(”ENTER THE TRAIN NAME : ”).upper()
print
trainno=int(input(”ENTER THE TRAIN NUMBER: ”))
print
no ofaclstclass=int(input(”ENTER NO OF AC FIRST CLASS SEATS TO BE RESERVED : ”))
print
no ofac2ndclass=int(input(”ENTER NO OF AC SECOND CLASS SEATS TO BE RESERVED : ”))
print
no ofac3rdclass=int(input(”ENTER NO OF AC THIRD CLASS SEATS TO BE RESERVED : ”))
print
no ofsleeper=int(input(”ENTER NO OF SLEEPER CLASS +SEATS TO BE RESERVED : ”))
print
startingpt=input(”ENTER THE STARTING POINT : ”)
print
destination=input(”ENTER THE DESTINATION POINT : ”)
os.system('cls')
def output():
print
(”=”*80)
print
print (”THE ENTERED TRAIN NAME IS : ”,trainname)
print (”THE TRAIN NUMBER IS : ”,train no)
print (”STARTING POINT ENTERED IS : ”,startingpt)
print (”DESTINATION POINT ENTERED IS : ”,destination)
print (”NO OF AC FIRST CLASS SEATS RESERVED ARE :”,no ofac lstclass) print
(”NO OF AC SECOND CLASS SEATS RESERVED ARE :”,no ofac2ndclass) print
(”NO OF AC THIRD CLASS SEATS RESERVED ARE :”,no ofac3rdclass) print (”NO
OF SLEEPER CLASS SEATS RESERVED ARE :”,no ofsleeper)
print
print (”=”*80)
def
gettrainname():
return
(trainname) def
gettrainno():
return(trainno)
def getno ofac lstclass():
return(no ofaclstclass)
def getno ofac2ndclass():
return(no
ofac2ndclass)
def getno ofac3rdclass():
return(no
ofac3rdclass)
def getno ofsleeper():
return (no
ofsleeper)
def getstartingpt():
return
(startingpt) def
getdestination():
return (destination)
def menu():
tr=train()
tick=tickets(
) print
print ("WELCOME TO DIVESH AGENCY".center(80))
while True:
print
print ("=”*80)
print (" \t\t\t\t RAILWAY”)
print
print ("=”*80)
print
print ("\t\t\t1. **UPDATE TRAIN
DETAILS.") print
print ("\t\t\t2. TRAIN DETAILS.
") print
print ("\t\t\t3. RESERVATION OF TICKETS.")
print
print ("\t\t\t 4. CANCELLATION OF TICKETS. ")
print
print ("\t\t\t 5. DISPLAY PNR
STATUS.") print
print ("\t\t\t6. QUIT.")
print("** - office use
.............................................."
)
ch=int(input("\t\t\t ENTER YOUR CHOICE :
")) os.system('cls')
print("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\
t\t\t\t\t\t\t LOADING. .",time.sleep(1))
print(".",time.sleep(0 5))
print
(".",time.sleep(2))
os.system('cls')
=’y'
while (x.lower()=='y'):
fout=open("trdetai1s.dat","ab
") tr.getinput()
dump(tr,fout)
fout.close()
print("\n\n\n\n\n\n\n\n\n\n\n\t\t\t UPDATING TRAIN LIST
PLEASE WAIT . .",time.sleep(1))
print (("."), time.sleep(0.5))
print
(("."),time.sleep(2))
os.system('cls')
print ("\n\n\n\n\n\n\n\n\n\n\n”)
x=input(”\t\t DO YOU WANT TO ADD ANY MORE TRAINS DETAILS ? ")
os.system('cls
') continue
e1if(j !=r): print("\
n\n\n\n\n”)
print("WRONG PASSWORD".center(80))
while True:
print("*"*80
)
print("\t\t\t\tTRAIN
DETAILS") print("*"*80)
print
tr=load(fin
)
tr.output(
)
input("PRESS ENTER TO VIEW NEXT TRAIN DETAILS”)
os.system('cls
') except:
pass
elif ch=
print('='*8
0)
print ("\t\t\t\
tRESERVATIONOFTICKETS”) print('='*80)
print
tick.reservation()
elif ch==
print("="*80)
print("\t\t\t\tCANCELLATION OF
TICKETS") print
print("="*80)
print
tick.cancellation(
)
elif ch
print ("=”*80)
print("PNR
STATUS".center(80))
print("="*80)
print
tick.display(
)
elif ch
quit()
input("PRESS ENTER TO GO TO BACK MENU”.center(80))
os.system('cls
') menu()
print("\t\t\t\t\n\n\n\n\n\t THANK YOU")
print("\n\t\t\t\DONE BY:-")
print("\t\t\t\t PRAKHAR
PACHPOR") print("\t\t\t\t XII-A”)
print("\t\t\t\t 22")
print("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t\
tLOADING..”,time.slee
print (”.”),
time.sleep(o.5)
print (".")
time.sleep(2)
os.system('cls')
menu(
)
REQUIREMENTS
Python 3.3 or higher
Python IDLE
Computer with 128 MB of RAM
BIBILIOGRAPHY
Sumita Arora’s Book for CS Class XI
Github
StackExchange
MADE BY:
MANAV SUNDRANI
KHUSHBU YADAV
URMILA SONI