0% found this document useful (0 votes)
6 views23 pages

Railway Reservation System Project

The document is a project file for a Railway Reservation System created by Ashish Dixit for the academic session 2020-21. It includes sections on the introduction, objectives, Python programming, data visualization techniques, source code, and hardware/software requirements. The project aims to apply programming knowledge in real-world scenarios, utilizing libraries such as Pandas and Matplotlib for data manipulation and visualization.

Uploaded by

kimaarya06
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)
6 views23 pages

Railway Reservation System Project

The document is a project file for a Railway Reservation System created by Ashish Dixit for the academic session 2020-21. It includes sections on the introduction, objectives, Python programming, data visualization techniques, source code, and hardware/software requirements. The project aims to apply programming knowledge in real-world scenarios, utilizing libraries such as Pandas and Matplotlib for data manipulation and visualization.

Uploaded by

kimaarya06
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

INFORMATICS

PRACTICES
PROJECT FILE
SESSION
(2020-21)

NAVINBHARTI SR.
SEC. SCHOOL
NAME:- ASHISH DIXIT

CLASS :- 12TH COMMERCE

ROLL No |4617435
ACKNOWLEDGEMENT

Texpress my gratitude to Mrs. Jyoti Mam, myinformaticS practices


teacher and guide, who guided me through the project and also gave
valuable suggestions and guidance for completing the project. She
shaped me to understand the intricate issues involved in making the
project. My project has been success only because of her guidance.

Name of the student: Ashish Dixit


Roll No. - #614|35
Signature
INDEX
SNo. Topic Teacher signature
1 Introduction

2 Objectives

3 Python

|
4 Theoretical background

5 Csv

Data visualization

Source code

Output

Hardware and software requirements

10 Bibliography
Introduction

The project "Railway Reservation System" is prepared to understand the


different activities performed at Railways dapartment.

Allthe activities are analysed with the help of Csv, Graphs and different
libraries of Python.
OBJECTIVES

The objective of this project is to let the students apply the programming
knowledge into real world situation and exposed the students now programming
skills helps in developing a good software.

" Write programs utilizing modern software tools.

" Write effective procedural code to solve small to medium sized problems.

"Apply object orientedprogramming principles effectively whendeveloping small


to medium sized objects.

" Students will demonstrate a breadth of knowledge in computer science, as


exemplified in the areas of systems, theory &software development.
Python

Python programming language was developed by Guido Van Rossum in February


1991. It is an easyto learn yet powerful object oriented programming language.
Python is an interpreted language.l

Advantages: Disadvantages:

[Link] to use 1. Not the fastest language


2. Lesser library than c, java.
[Link]-platform 3. Not strong on type-binding.
[Link]
[Link]
THEORETICAL BACKGROUND

PANDAS:
Pandas is a software librarywritten for the python programming
language for data manipulation and analysis.
Install pandas:
Step 1: Open command prompt.
Step 2: Before installing with pip, make sure that you are on right
path.

Step 3: Type pip install

pandasFeatures:
[Link] supports reshaping of find and fill missing data.
[Link] has the functionality to find and fill missing data.

Matplotlib:
Matplotlib is apyplot 2D plotting library which produces publication -quality
figures. Pyplot is a module of matplotliblibrary (of python ) containing collection
of methods which allows a users to create 2D plots and graph
Install matplotlib:
Step 1: Open command prompt.
Step 2: Type cd\to move to the root dictionary.
Step 3: Type pip install matplotlib.
Step 4: Installationof matplotlibwill start.

Features:
Internet connection is required only at a time of installation of matplotlib. After
installation gets competed, there is no such requirement.

Numpy:
Numpy stands for numerical python. Numpy is a core library for scientific
computing in python it providing a high -performance multidimensional array
object and tools for working with these arrays.
Install numpy:
Step 1: Open command prompt.
Step 2: Type pip installnumpy.

Features:
[Link] logicaloperations on arrays.
2.0perations related to lineae alegebra
Csv

CSV(comma seperated values) is a simple file formate used to store


Tabular data , such as a spreadsheet or database.
For working CSV file in python, there is an in built module called csv.
ADVANTAGES CSV FILE:
1. Acommon format for data interchange.
2. Asimple, compact and ubigquitous format for data storage.
3. t can be opened in popular spreadsheet packages like MS [Link]
office-calc_ etc.
4. Nearly allspeadsheet and databases support import/export to CSV
format
5. SV file can be opened and edited by text editord like notepad.
READING FROM CSV FILE TO DATAFRAME:
SYNTAX FOR READ_CsV() METHOD IS:
import pandas as pd
<df=pd.read_csv<flepath>)
DATA VISIUALISATION

$ Data Visualization:
Data visualization refers to the graphical or visual representation of information
and data using visual elements like charts, graphs, etc.

Line plot:
The line chart is represented by a series of data points connected by a straight
[Link]: [Link] ()

Scatter chart:
A scatter pBot is atwo-dimensional data visualization that uses dots to represent
the values obtained for two different variables-one plotted along the x-axis and
the other plotted along y=axis.
Syntax: [Link] )

Multi bar plot:


Abar chart represents categorical data with rectangular bars. Each bar has a
height which corresponds to the value it represents.
Syntax: [Link] ()
Histograrhs
Anistogram isa powerful technique in datavisualization. It is an accurate
graphical representation of the distribution of numerical data. It was 1
introduced by Karl Pearson.
Syntax: [Link] ()
Box plot -

Boxplot are descriptive diagrams that help compare the distribution of


different series of data.

Syntax: [Link] 0
Pie chart:

Apie chart is a circular plot divided intoslices to shownumerical


proportion. Pie plots are widely used in the business world.
Syntax: [Link] ()
" Frequency polygon:
Frequency polygonsare a graphical device for understanding the shapes of
distributions.

Syntax: [Link] ()
SOURCE
CODE
import pandas as pd
import [Link] as plt

def menu():

print()
print(" s***")

print(" RAILWAY RESERVATION SYSTEM

print("* ***)

print()
print(" 0. Know about the project")
print(" 1. Reading file train")
print(" 2. Adding New Train Details in file")
Print(" 3. Schedule of All Trains")
Print(" 4. Total Numbers of Trains")

Print(" 5. Sorting Trains By Number of Trains")

Print(" 6. Fare of Trains")

Print(" 7. Train Enquiry")


Print(" 8. Cancel Train")
Print(" 9. Delay in Arrival")
Print(" 10. Read Passengers File")
Print(" 11. Adding New Passenger's Details in File")
Print(" 12. Ticket Reservation")
Print(" 13. Show Status of the Ticket")
Print (" 14. Top and Bottom Records from Passengers")
Print(" 15. Line Plot")
Print(" 16. Line1 Plot")
Print(" 17. Bar Plot")
Print(" 18. Bar2 Plot")
Print("
menu()
def about():
print("The Project is developed on RAILWAY RESERVATION SYSTEM. It contains 21
options")
def read_train():
print(Reading Details of File Train')
print()
print()
df=pd.read_ csv("C:I/Users/l user//Documents//[Link]",index _col=0)
print(df)

def new train():


print(Adding new Train in File Train')

dí=[Link] csv("C://Users//userl/Documents//[Link]", index col=0)


print(df)
a=int(input("Enter Train Number :")
b=(input("Enter Train Name:")
c=(input("Enter Source:")
e=int(input("Enter Destination:")
f-int(input("Enter Ac Fare:")
[Link][a]=[b.c,d,e,f]
print(df)

def schedule 0:
print("schedule of AllTrains")

print()
df=[Link] csv("C://Users/luser//Documents//[Link]",index col=0)

print(df)
def totaltrains():
print('Find Total Trains ')
csv("C://Users//userl/Documents//[Link]")
df=[Link]
print (df)

def sort trainno():


order')
print('sorting train No. of trains in Descending
print()
[Link] csv("C://Users//user//Documents//[Link]",index_col=0)

df=df. sort values('tnum', ascending=False)

df fare():
Ascending order and show Fares
print (Sorting Trains Names in col=0,usecols=[tname',
csv("C://Users//user//Documents//[Link]",index
[Link]
'ac', 'slp])
df=[Link] values('tname')

print(df)

def enquiry ():


Train')
print('Find out Arrival Time of a
csv("C:/Users//userl/DocumeDts//[Link]",index col=0)
df=[Link]
print(df)
print()

def canceltrain():
File stock')
print(' Deleting Medicine from
csv("C://Users/luser//Documents//[Link]", index col=0)
df=[Link]
print(df)
OUTPUT
RAILWAY AESERVATION SYSTEM Project

a. Kno about the Project


1. Reading file train
2. Adcirg iew Train Detail in File
3. Schedule o A11 Trains
4. Total tiumber of Trains
5. Sorting Train by hunber of Trains
6. Train Fare
7. Train Enquiry
8. Cancel Train
9. Delay in Arrival
13. Read Passengers File
11. Adding iew passenger's Detail in File
12. Ticket Reservation
13. Show status of the Ticket
14. Top and Bottor Records from passenger
15. Line Piot
16. Linel Plot
17. Bar Plot
18. 5arl Plot

enter your choice : e


contains 20
The Project is developed on RAILWAY RESERVATION SYSTEM. It
Options. In the Project 3 CSV Files are used...Train
passengers and schedule
invalid option
enter your choice : 15
Line plot
tnum
e 4347
tname source destination
Goa Express Delhi ac
slp
1 5353 Goa 6808 380e
Jammu Tavi
2 4356 Punjab Express Delhi Jammu 18008 7e8e
Delhi Punjab

AC Fare for Trains


10000

9500

9000
ACFare
8500

8000

7500

7000

6500

6000

Goa Express jammu Tavt Punjab Express


Tra
rains
Sleeper Fare for Trains
7000

6000
Sleeper
Fare
5000

4000

3000

2000

1000

G oE
axpress J a m mT
ua v i P u n j aE
bx p r e s s

Trains
HARDVWARE AND SOFTWARE
REQUIREMENTS
[Link] SYSTEM WINDOWS 7 AND ABOVE
II. PROCESSOR PENTIUM(ANY) OR AMD

ATHALON(3800+- 4200+ DUAL CORE)


III. MOTHERBOARD 1.845 OR915.995 FOR PENTIUM OR MSI
K9MM-V VIAK8M800+8237R PLUS
CHIPSET FOR AMD ATHALON

IV. RAM 512MB+

V. Hard disk SATA40 GB OR ABOVE


VI. CD/DVD r/w multi drive comnbo: (If back uprequired)
VII. FLOPPY DRIVE 1.44 MB (If Backup required)
VIII. MONITOR 14.1 or 15 -17 inch

|X. Key board and mouse

X. Printer (if print is required - [Hard copy]

SOFTWNARE REQUIRED:

WINDOWS Os

PYTHON
BIBLIOGRAPHY

, INFORMATICS PRATICES - SUMITA ARORA


- CLASS 12T* NCERT BOOK
[Link]
- [Link]

You might also like