Keshank Class 12 Computer Science Project Python PDF Free
Keshank Class 12 Computer Science Project Python PDF Free
TOPIC:
RAILWAY RESERVATION SYSTEM
ALL INDIA SENIOR SCHOOL CERTIFICATE EXAMINATION
(AISSCE)
SESSION 2019-20
2. Acknowledgements
3. Declaration
4. Aim
7. Requirements
8. Bibliography
CERTIFICATE
This is to certify that
KESHANK VERMA
have successfully completed
this project report entitled
“RAILWAY RESERVATION SYSTEM”
During the academic year 2019-2020
towards partial fulfilment of
C.S. Practical Examination
conducted by CBSE.
Actually, the list can go on and on. This defines the power of
Python as a programming language. Hence it becomes very
important to learn how to write to a file using python and then
read from the same file.
Python is an interpreted, object-oriented, high-level programming
language with dynamic semantics. Its high-level built in data
structures, combined with dynamic typing and dynamic binding,
make it very attractive for Rapid Application Development, as
well as for use as a scripting or glue language to connect existing
components together.
Hence when are you about to handle such situations, the role of
files will come into the picture.
Python too supports file handling and allows users to handle files
i.e., to read and write files, along with many other file handling
options, to operate on files. The concept of file handling has
stretched over various other languages, but the implementation is
either complicated or lengthy, but alike other concepts of Python,
this concept here is also easy and short. Python treats file
differently as text or binary and this is important. Each line of
code includes a sequence of characters and they form text file.
Each line of a file is terminated with a special character, called
the EOL or End of Line characters like comma {,} or newline
character. It ends the current line and tells the interpreter a new
one has begun. Let’s start with Reading and Writing files.
“ r “, for reading.
“ w “, for writing.
“ a “, for appending.
“ r+ “, for both reading and writing
One must keep in mind that the mode argument is not mandatory.
If not passed, then Python will assume it to be “ r ” by
default.
We can define our most used functions in a module and import it,
instead of copying their definitions into different programs.
We can import the definitions inside a module to another module
or the interactive interpreter in Python.
We use the import keyword to do this.
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
Due to the huge magnitude of the spread of IR, the system cannot
sustain without computers, which have programs built for its
smooth functioning. This project deals with the Indian Railways
and presents a system to digitize the system.
CODING
MODULES USED
tickets.py
if(f==0):
time.sleep(2)
print ("\n\n\n\n\n\n\t\t\t\t NO SUCH TRAINS
FOUND!!") time.sleep(2)
print
print
print
train.py
def menu():
tr=train()
tick=tickets()
print
print ("WELCOME TO DIVESH AGENCY".center(8o))
while True:
print
print ("="*80)
print(" \t\t\t\t RAILWAY")
print
print ("="*80)
print
print ("\t\t\tl. **UPDATE TRAIN DETAILS.")
print
print ("\t\t\t2. TRAIN DETAILS.")
print
print ("\t\t\t3. RESERVATION OF TICKETS.")
print
print ("\t\t\t4. CANCELLATION OF TICKETS.")
print
print ("\t\t\ts. DISPLAY PNR STATUS.")
print
print ("\t\t\t6. QUIT.")
p. nn t("* * - off"ice 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(!))
print(".",time.sleep(o.s))
print (".",time.sleep(2))
os.system('cls')
rfJ C:\Pytlhon27\python.exe
rJ C:\Pytlhon27\python.exe
if ch==l:
j="password"
r=input("\n \n\n\n\n\n\n\n\n\n\n\t\t\t\tENTER THE PASSWORD: ")
os.system('cls')
if (j==r):
x='y'
while (x.lower()=='y'):
fout=open("trdetails.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(o.s))
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
elif(j !=r):
print("\n\n\n\n\n")
print("WRONG PASSWORD".center(8o))
C:\Python27\python.exe
RA I L\/AY
elif ch==2:
fin=open("trdetails.dat",'rb')
if not fin:
print ("ERROR")
else:
try:
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
C:\Pytjhon27\python.exe
elif ch==3:
print('='*8o)
print ("\t\t\t\tRESERVATION OF TICKETS")
print('='*8o)
print
tick.reservation()
C:\Pyilion27\python.exe
RA I L\JAY.
: C:\Pytlhion27\python.el!!
e
r'l, C:\Python27\python.e;,;:,e
elif ch==4:
print("="*8o)
print("\t\t\t\tCANCELLATION OF TICKETS")
print
print("="*8o)
print
tick.cancellation()
elif ch==S:
print
("="*So)
print("PNR STATUS".center(So))
print("="*8o)
print
tick.display(
elif ch==6:
quit()
input("PRESS ENTER TO GO TO BACK MENU".center(So))
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'')
BIBILIOGRAPHY
Sumita Arora's Book for CS Class XI
Sumita Arora's Book for CS Class XII
Github
StackExchange
MADE BY:
ABHINAVVERMA
KESHANK VERMA
PRAKHARPACHPOR
SUMITVERMA