Project File Railways
Project File Railways
PROJECT REPORT ON
ROLL NO :
NAME : YASHIKA KATARIA
CLASS : XII - C
SUBJECT : INFORMATICS PRACTICES
SUB CODE : 065
1
PROJECT SYNOPSIS
ON
RAILWAYS
RESERVATION
SYSTEM
FOR AISSCE 2023 EXAMINATION
[AS A PART OF THE INFORMATICS
PRACTICES COURSE (065)]
2
Project Logbook
PROJECT NAME :RAILWAYS RESESRVATION SYSTEM
1. YASHIKA KATARIA
2. ROHAN
3
CERTIFICATE
2023 and has been carried out under my direct supervision and guidance. This
report or a similar report on the 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 Student Signature of Teacher/Guide
4
ACKNOWLEDGEMENT
__________________
YASHIKA KATARIA
Class XII –C
ROLL NO :________________
5
TABLE OF CONTENT
AIM
INTRODUCTION
THEORETICAL BACKGROUND
LIST OF REPORTS
CSV FILE
ADVANTAGES
DISADVANTAGES
CONCLUSION
BIBLOGRAPHY
6
AIM
The main objective of the Railway Reservation System is to manage the
to re duce the manual work for managing the Train, Booking, Customer,
7
INTRODUCTION
8
THEORETICAL BACKGROUND
❖WHAT IS PYTHON?
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. 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.
Often, programmers fall in love with Python because of the increased productivity
it provides. Debugging Python programs is easy: a bug or bad input will never
cause a segmentation fault. Instead, when the interpreter discovers an error, it raises
an exception. A source level debugger allows inspection of local and global
variables, evaluation of arbitrary expressions, setting breakpoints, stepping through
the code a line at a time, and so on. The debugger is written in Python itself,
testifying to Python's introspective power. On the other hand, often the quickest
9
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.
What is Pandas?
Pandas is Python’s library for data analysis. Pandas has derived its name from
“Panel Data System” and its has become very popular choice for data analysis.
Data Analysis refers to process of evaluating big data sets using analytical and
statistical tools so as to discover useful information and
b) Dataframe
Data visualization
10
datasets. Data visualization is the discipline of trying to expose the data to
understand it byplacing it in a visual context. Its main goal is to distill large datasets
into visual graphics toallow for easy understanding of complex relationships within
the data. Several datavisualization libraries are available in Python, namely
Matplotlib, Seaborn, and Folium etc.
• Better analysis
• Quick action
• Identifying patterns
• Finding errors
What is matplotlib.pyplot
Matplotlib is the whole python package/ library used to create 2D graphs and plots
by usingpython scripts. pyplot is a module in matplotlib, which supports a very
wide variety of graphsand plots namely - histogram, bar charts, power spectra, error
charts etc. It is used along withNumPy to provide an environment for MatLab.
Pyplot provides the state-machine interfaceto the plotting library in matplotlib.It
11
means that figures and axes are implicitly andautomatically created to achieve the
desired plot.For example, calling plot from pyplot willautomatically create the
necessary figure and axes to achieve the desired plot. Setting a titlewill then
automatically set that title to the current axes object.Thepyplot interface isgenerally
preferred for non-interactive plotting (i.e., scripting).
12
HARDWARE AND SOFTWARE
REQUIREMENT
HARDWARE SYSTEM:
OS- Windows 7 Professional 32-Bit (6.1, Build 7601)
Language: English
System Manufacture-Gigabyte Technology Co., Ltd
BIOS:-BIOS Date: 08/03/13 09:45:07
Ver: 04.06.05
Processor:- Intel (R) Core ™ i3-3220CPU
@3.30 GHz (4CPUs), ~3.3GHz
Memory: 2048 MB RAM
DirectX Version: Direct XII 22
DISPLAY DEVICE:
Name:-Intel(R) HD Graphics
Manufacturer: - Gigabyte Technology Co., Ltd
Chip Type: - Intel(R) HD Graphics Family
DAC Type:-Internal
Approx. Total Memory:-775 MB
Current Display mode: - 1336 X 768
(32 Bit)(60Hz)
Monitor:- Generic PnP Monitor 23
DRIVER:
Main Driver: - igdumdim 32.dll,igdloiumd 32.dll,igd lo
13
Version:-10.18.10.3345
Date:-10/28/13
WHQL logo’s:- Yes
DDI Version: II
Driver Model:-WDDM 1.1 24
SOFTWARE REQUIREMENT:
Windows 2000/XP OS is desirable.
Python IDLE Ver 3.7.2 or higher should be installed.
MySQL 8.0 should be installed.
PANDAS Library with matplotlib.pyplotmust be present at machine.
14
LIST OF REPORTS
REPORTS ON COMPLETE DATA
COLUMN WISE REPORT ROW WISE REPORT
>Count>Subdivision
>Mean>Year
>Maximum>Annual
>Minimum>Jan
>Percentage>Feb
15
Csv file
Train
Passenger
Schedule
16
CODING
import pandas as pd
def menu():
print()
print("**************************************************************
***************************************")
print()
print("6.Train Fare")
17
print("7.Train Enquiry")
print("8.Cancel Train")
print("9.DeLay in Arrival")
print("15.Line plot")
print("16.Linel Plot")
print("17.Bar Plot")
print("18.Barl Plot")
print("19.Barh Plot")
print("20.Barhl Plot")
print("**************************************************************
****************************************")
menu()
18
def about():
def read_train():
print()
print()
print(df)
def new_train():
print(df)
c=(input("Enter source:"))
d=(input("Enter destination:"))
e=(input("enter ac fare:"))
19
f=(input("Enter sleeper fare:"))
df.loc[a]=[b,c,d,e,f]
print(df)
def schedule():
print()
print(df)
def totaltrains():
print(df)
def sort_trainno():
print()
print(df)
20
def fare():
print( 'sorting Trains Names in Ascending order and show Fares ')
df=df.sort_values('tname')
print(df)
def enquiry():
print(df)
print()
#print(df.loc[df['tnum']==5353])
def canceltrain():
print(df)
df.drop(tnum,axis=0,inplace=True)
21
print("record of train temporarily deleted")
print()
print(df)
def changetiming():
print()
print(df)
print()
df.loc[df['tnum']==5353,['arrival']]=df['arrival']+':40'
#print(df)
print()
#df["bal"]=df["bal"]-3000
print(df)
def read_passengers():
print()
print(df)
22
def new_passengers():
print(df)
df.loc[n]=[a,tn,noofp,c,d,amt,s,pnr]
print(df)
def ticketreservation():
print()
23
print("1.FIRTS CLASS AC RS 6000 PER PERSON")
print(tname)
if(x==1):
s=6000*n
elif(x==2):
s=3000*n
else:
print("invalid option")
if(x==1):
24
print("you have chosen the first class ac ticket")
s=10000*n
elif(x==2):
s=7000*n
else:
print("invalid option")
def status():
print(df)
def top_bottom():
print('top 2 row')
print(df.head(2))
print()
print()
25
print("last 2 row")
print(df.tail(2))
def line_plot():
print("line plot")
print(df)
x=df['tname']
y=df['Ac']
plt.xlabel("trains",fontsize=14,color="r")
plt.ylabel("ac fare",fontsize=14,color="r")
plt.plot(x,y,marker="x",ls="dashed",linewidth=4,color="g")
plt.show()
def line1_plot():
print(df)
plt.plot(df['tname'],df['slp'],marker='o',label="fare")
plt.xlabel("trains",fontsize=14,color="r")
26
plt.ylabel("sleeper fare",fontsize=14,color="r")
plt.xticks(rotation=30)
plt.legend()
plt.grid(True)
plt.show()
def bar_plot():
print("bar plot")
print(df)
x=df["tname"]
y=df["slp"]
plt.xlabel("trains",fontsize=14,color="r")
plt.ylabel("sleeper fare",fontsize=14,color="r")
plt.xticks(rotation= 30)
plt.bar(x,y,color=['red','yellow'])
plt.show()
27
def bar1_plot():
print('bar plot')
print(df)
x=df['tname']
y=df['Ac']
plt.xlabel("trains",fontsize=14,color="g")
plt.ylabel("ac fare",fontsize=14,color="g")
plt.xticks(rotation=30)
plt.bar(x,y,color=["orange","blue"])
plt.show()
def barh_plot():
print(df)
x=df['tname']
y=df['slp']
plt.ylabel('sleeper fare',fontsize=14,color="b")
plt.barh(x,y,color='blue',edgecolor="pink")
plt.show()
def barh1_plot():
print(df)
x=df["tname"]
y=df["slp"]
plt.xlabel('train',fontsize=14,color="r")
plt.ylabel("ac fare",fontsize=14,color="r")
plt.barh(x,y,color="orange",edgecolor="red")
plt.show()
opt=""
29
if opt==0:
about()
if opt==1:
read_train()
elif opt==2:
new_train()
elif opt==3:
schedule()
elif opt==4:
totaltrains()
elif opt==5:
sort_trainno()
elif opt==6:
fare()
elif opt==7:
enquiry()
elif opt==8:
canceltrain()
30
elif opt==9:
changetiming()
elif opt==10:
read_passengers()
elif opt==11:
new_passengers()
elif opt==12:
ticketreservation()
elif opt==13:
status()
elif opt==14:
top_bottom()
elif opt==15:
line_plot()
elif opt==16:
line1_plot()
elif opt==17:
bar_plot()
31
elif opt==18:
bar1_plot()
elif opt==19:
barh_plot()
elif opt==20:
barh1_plot()
else:
print("invalid option")
print("\a")
32
OUTPUT
33
34
35
36
37
38
39
GRAPH
40
GRAPH
41
GRAPH
42
GRAPH
43
GRAPH
44
GRAPH
45
ADVANTAGES
Cheaper means of transport.
Reduced the time travel to a few hours between two places.
Environment friendly means of transportation.
A large number can carried out a person.
46
DISADVANTAGES
Outdated technology.
No door to door service.
Problem of laying double line.
Problem of replacement.
47
CONCLUSION
“RAILWAYS IN INDIA 1853” HAS BEEN MADE TO REDUCE THE LONG
DISTANCE TRAVEL AND WITH THE HELPS OF THIS PROJECT EVERY WORK
48
BIBLOGRAPHY
INFORMATICS PRACTICES SUMITA ARORA CLASS XII
KAGGLE.COM
COLAB PLATFORM
49