0% found this document useful (0 votes)
11 views17 pages

Cs Project 2 Abhi

Uploaded by

cadetadityakiran
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)
11 views17 pages

Cs Project 2 Abhi

Uploaded by

cadetadityakiran
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
You are on page 1/ 17

KENDRIYA VIDYALAYA

CRPF PERINGOME

2023-2024
COMPUTER SCIENCE
INVESTIGATORY PROJECT

SUBMITTED BY: ABHIMANIU K


CLASS: XII
REGISTERED ROLL NUMBER:24638106
Content
TABLE OF CONTENTS
S NO DESCRIPTION PAGE NO
01 ACKNOWLEDGEMENT 03
02 CERTIFICATE 04
03 INTRODUCTION 05
04 OBJECTIVES OF THE PROJECT 05
05 PROPOSED SYSTEM 06
06 SOURCE CODE 07
07 OUTPUT 13
09 BIBILOGRAPHY 17
ACKNOWLEDGEMENT

Apart from the efforts of me, the success of any project


depends largely on the encouragement and guidelines of many
others. I take this opportunity to express my gratitude to the
people who have been instrumental in the successful
completion of this project.

I would like to express my sincere gratitude and pleasure


to our Computer Science teacher Mr. Abhilash V Jose for
helping me to complete this project. It is due to their valuable
guidance, support, and supervision that this project has come
to attain its present form. I express my heartfelt gratitude to
my parents for constant encouragement while carrying out this
project.

I gratefully acknowledge the contribution of the individuals who


contributed in bringing this project up to this level, who
continues to look after me despite my flaws.

The guidance and support received from all the members who
contributed and who are contributing to this project, was vital
for the success of the project. I am grateful for their constant
support and help.
CERTIFICATE

This is to hereby certify that the original and genuine


investigation work has been carried out to investigate about
the subject matter and the related data collection and
investigation has been completed solely, sincerely, and
satisfactorily by ABHIMANIU K of class XII, Kendriya Vidyalaya
CRPF Peringome, regarding his project titled-"TRAIN
TICKET BOOKING SYSTEM"

Signature of examiner:

Signature of subject teacher:

Signature of principal:
INTRODUCTION

“TRAIN TICKET BOOKING SYSTEM” This project is useful for the


customers to book train tickets. The emerging of digital system
made information available on finger tips. By digitalising the
ticket system, customers find it easier to travel, to their
favourite places without the hassle of buying tickets from a
counter

OBJECTIVES OF THE PROJECT

The objective of this project is to let the students apply the programming
knowledge into a real world situation/problem and exposed the students how
programming skills helps in developing a good software.
1. Write programs utilizing modern software tools.
2. Apply object-oriented programming principles effectively when developing
small to medium sized projects.
3. Write effective procedural code to solve small to medium sized problems.
4. Students will demonstrate a breadth of knowledge in computer science, as
exemplified in the areas of systems, theory, and software development.
5. Students will demonstrate ability to conduct research or applied Computer
Science project, requiring writing and presentation skills which exemplify
scholarly style in computer science.
PROPOSED SYSTEM

Today one cannot afford to rely on the fallible human beings of be really wants to
stand against today's merciless competition where not to wise saying "to err is
human" no longer valid, it's outdated to rationalize your mistake. So, to keep pace
with time, to bring about the best result without malfunctioning and greater
efficiency so to replace the unending heaps of flies with a much-sophisticated
hard disk of the computer

One must use the data management software. Software has been an ascent in
atomization various organisations. Many software products working are now in
markets, which have helped in making the organizations work easier and
efficiently Data management initially had to maintain a lot of ledgers and a lot of
paperwork has to be done but now software production this organization has
made their work faster and easier. Now only this software has to be loaded on
the computer and work can be done.

This prevents a lot of time and money. The work becomes fully automated and
any information regarding the organization can be obtained by clicking the
button. Moreover, now it is an age of computers of and automating such an
organization gives the better look.
source code
import random

from datetime import datetime as dt

import csv

tlist = []

for i in range (1,100000):

tlist.append(i)

while True:

print('~'*100)

print('')

print('-----train ticket booking portal--------')

print('')

print('')

print('ticket 1')

print('')

print('available seats 2')

print('')

print('train status 3')

print('')

print('ticket details 4')

print('')

x=int(input('choice: '))

def availableseats():

seat=set()

for i in range(200):

o.append(i)

no=random.randint(1,100)

print('number of available seats: ',no)


for k in range(1,no):

p=random.choice(o)

seat.add(p)

seats=list(seat)

print('available seats: ',seats)

return seats

if x==1:

ans=''

file=open('train1.csv','w')

my=csv.writer(file)

dlist=[]

o=[]

while True:

print ('')

print ('')

a=input ('name: ')

age=int(input('age: '))

date=input('date of birth(dd/mm/yyyy): ')

while True:

c=input('compartment[ac/non ac]: ')

if c.lower()=='ac' or c.lower()=='non ac':

break

else:

print('PLEASE ENTER A VALID COMPARTMENT')

continue

tc=random.choice(tlist)

tlist.remove(tc)
tr=['vande bharath','parushuram express','trivandrum express','chennai express','ernad express']

train=random.choice(tr)

print(' mangalapuram 1')

print('kasargod 2')

print('payyannur 3')

print('kannur 4')

print('kozhikode 5')

f=int(input('from: '))

t=int(input('to: '))

seats=availableseats()

while True:

b=int(input('seat: '))

if b not in seats:

print('seat not available')

continue

else:

break

d=0

if f>t:

d=f-t

else:

d=t-f

if c.lower()=='ac':

if d==1:

print('amount to be paid 100')

elif d==2 :

print('amount to be paid 200')

elif d==3 :

print('amount to be paid 300')


elif d==4 :

print('amount to be paid 400')

elif c.lower()=='non ac':

if d==1 :

print('amount to be paid 50')

elif d==2 :

print('amount to be paid 100')

elif d==3 :

print('amount to be paid 150')

elif d==4 :

print('amount to be paid 200')

datetime=dt.now()

dtstr=str(datetime)

dtlist=dtstr.split()

date=dtlist[0]

time=dtlist[1]

print('processing..........')

print('')

print('')

print('==== TICKET CONFIRMED====')

pt=[1,2,3]

print('your train will be on platform number',random.choice(pt))

print('ticket number:',tc)

if f==1:

fr='mangalapuram'

elif f==2:

fr='kasargod'

elif f==3:

fr='payyannur'
elif f==4:

fr='kannur'

elif f==5:

fr='kozhikode'

if t==1:

to='mangalapuram'

elif t==2:

to='kasargod'

elif t==3:

to='payyannur'

elif t==4:

to='kannur'

elif t==5:

to='kozhikode'

my.writerow([tc,a,age,date,b,c,fr,to,train,date,time])

ask=input('do you want to buy more tickets?[y/n]')

if ask=='y':

continue

else:

break

print('')

print('')

print('')

file.close()

elif x==2:

a=input('ac/non ac')

if a.lower()=='ac':

availableseats()

else:
availableseats()

elif x==3:
st=['mangalapuram','uduppi','kasargod','kanhangad','nileshwar','payyannur','kannur','vadakara',
'kozhikode']

b=random.choice(st)

print(b)

elif x==4:

f=open('train1.csv','r')

myreader=csv.reader(f)

tc=int(input('ticket number: '))

re=[]

for i in myreader:

if len(i)!=0:

re.append(i)

for k in re:

if k[0]==str(tc):

print('')

print('')

print('name:',k[1])

print('age:',k[2])

print('date of birth:',k[3])

print('seat:',k[4])

print('compartment:',k[5])

print('from:',k[6])

print('to:',k[7])

print('train:',k[8])

print('date :',k[9])

print('time :',k[10][0:8])

f.close()
OUTPUT
1.output for booking ticket
-----train ticket booking portal--------
ticket 1
available seats 2
train status 3
ticket details 4
choice: 1
name: adith
age: 17
date of birth(dd/mm/yyyy): 25/01/2007
compartment[ac/non ac]: ac
mangalapuram 1
kasargod 2
payyannur 3
kannur 4
kozhikode 5
from: 1
to: 3
number of available seats: 13
available seats: [65, 34, 135, 8, 106, 171, 108, 142, 79, 114, 92, 126]
seat: 65
amount to be paid 200
processing..........
==== TICKET CONFIRMED====
your train will be on platform number 2
ticket number: 40467
do you want to buy more tickets?[y/n]

2.output for available seats

-----train ticket booking portal--------


ticket 1
available seats 2
train status 3
ticket details 4
choice: 2
ac/non ac: ac
number of available seats: 20
available seats: [1, 130, 10, 13, 141, 27, 160, 165, 43, 175, 177, 189, 62,
71, 91, 96, 104, 115, 126]
3.output for train status

-----train ticket booking portal--------


ticket 1
available seats 2
train status 3
ticket details 4
choice: 3
uduppi

4.output for ticket details

-----train ticket booking portal--------


ticket 1
available seats 2
train status 3
ticket details 4
choice: 4
ticket number: 40467
name: adith
age: 17
date of birth: 2024-01-18
seat: 65
compartment: ac
from: mangalapuram
to: payyannur
train: vande bharath
date : 2024-01-18
time : 20:12:33
BIBILOGRAPHY

- https://en.wikipedia.org

- https://www.google.com

- https://www.chatGPT.com

- Computer science with python class XII by Sumita


Arora

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy