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

Railway project

dhjk
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Railway project

dhjk
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 29

TKS SENIOR SECONDARY PUBLIC

SCHOOL

COMPUTER SCIENCE PROJECT


ON
RAILWAY RESERVATION SYSTEM

SUBMITTED BY:

R.HEMALATHA
P.GAYATHRI
INDEX
Certificate
o Acknowledgements

o Declaration

o Aim

o Coding with Screenshots

o Requirements

o Bibliography
ACKNOWLEDGEMENT
We take this opportunity to express our profound gratitude
and deep regards to our subject teacher for his exemplary
guidance, monitoring and constant encouragement throughout
the course of this project.

The blessing, help and guidance given by him time to shall


carry us a long way in the journey of life on which we are about
to embark.
AIM

Write a program using Python and MY-SQL


connectivity for Railway Reservation
INTRODUCTION
This project introduces railway reservation system. It
explains how reservation is being done in Indian
Railways. The step by step procedure is explained. Proper
comments have been given at desired location to make the
project user friendly. Various functions and structures are
used to make a complete use of this language, this project
is well versed with the programming. Railway reservation
can easily accompany with the help of this.
ABOUT PYTHON

Python is a high level, object-oriented programming


language. It was developed in 1991 by Guido Van Rossum. Its
syntax is similar to the English Language and that is why it
enhances code readability. It uses indentation for defining
scopes of loops if-else construct, class, etc.

Python Logo -File Handling in Python

Python can be used to create server-side applications.

Python can help to do task automation using scripting.

Python is used to create stand-alone applications.

Python is used in Big Data, data science, Machine Learning

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's simple, easy to learn syntax emphasizes readability


and therefore reduces the cost of program maintenance. Python
supports modules and packages, which encourages program
modularity and code reuse. The Python interpreter and the
extensive standard library are available in source or binary form
without charge for all major platforms, and can be freely
distributed.
On the other hand, often the quickest way to debug a
program is to add a few print statements to the source: the fast
edit-test- debug cycle makes this simple approach very
effective.With so many packages available, we are seeing, in
particular, a huge uptake in those used for AI and data science
projects.
FILE HANDLING IN PYTHON

If you are working in a large software application where they


process a large number of data, then we cannot expect those data
to be stored in a variable as the variables are volatile in nature.

Hence when are you about to handle such situations, the role
of files will come into the picture.

As files are non-volatile in nature, the data will be stored


permanently in a secondary device like Hard Disk and using
python we will handle these files in our applications.

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.
Working of open() function:
We use open () function in Python to open a file in read or
write mode. As explained above, open ( ) will return a file object.
To return a file object we use open() function along with two
arguments, that accepts file name and the mode, whether to read
or write. So, the syntax being: open(filename, mode). There are
three kinds of mode, that Python provides and how files can be
opened:

“ 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.

There are also various other functions that help to manipulate


the files and its contents. One can explore various other
functions in Python Docs.
ABOUT MODULES

Modules refer to a file containing Python statements and


definitions. A file containing Python code, for e.g.: example.py, is
called a module and its module name would be example.

We use modules to break down large programs into small


manageable and organized files. Furthermore, modules provide
reusability of code.

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.

Python has a ton of standard modules available. Standard


modules can be imported the same way as we import our user-
defined modules.

Some advantages of modules are:

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

Indian Railways is the state-owned railway company of India;


it has a complete monopoly over the country's rail transport.
Indian Railways (IR) has one of the largest and busiest rail
networks in the world, transporting over 5 billion passengers and
over 350 million tonnes of freight annually. IR is also the world's
largest commercial or utility employer, having more than 1.6
million regular employees on its payroll.

Railways were first introduced to India in 1853, and by 1947,


the year of India's independence, it had grown to forty-two rail
systems. In 1951 the systems were nationalised as one unit, to
become one of the largest networks in the world.
Indian Railways operates both long distances, as well as suburban
rail systems. It operates 8,702 passenger trains and transports
around five billion annually across twenty-seven states and three
union territories (Delhi, Puducherry and Chandigarh). Sikkim is
the only state not connected. The Railway Budget deals with the
induction and improvement of existing trains and routes, the
modernisation and most importantly the tariff for freight and
passenger travel.

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
MAIN CODE USED
REQUIREMENTS

BIBLIOGRAPHY

You might also like