Cs Project 2 Abhi
Cs Project 2 Abhi
CRPF PERINGOME
2023-2024
COMPUTER SCIENCE
INVESTIGATORY PROJECT
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
Signature of examiner:
Signature of principal:
INTRODUCTION
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
import csv
tlist = []
tlist.append(i)
while True:
print('~'*100)
print('')
print('')
print('')
print('ticket 1')
print('')
print('')
print('')
print('')
x=int(input('choice: '))
def availableseats():
seat=set()
for i in range(200):
o.append(i)
no=random.randint(1,100)
p=random.choice(o)
seat.add(p)
seats=list(seat)
return seats
if x==1:
ans=''
file=open('train1.csv','w')
my=csv.writer(file)
dlist=[]
o=[]
while True:
print ('')
print ('')
age=int(input('age: '))
while True:
break
else:
continue
tc=random.choice(tlist)
tlist.remove(tc)
tr=['vande bharath','parushuram express','trivandrum express','chennai express','ernad express']
train=random.choice(tr)
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:
continue
else:
break
d=0
if f>t:
d=f-t
else:
d=t-f
if c.lower()=='ac':
if d==1:
elif d==2 :
elif d==3 :
if d==1 :
elif d==2 :
elif d==3 :
elif d==4 :
datetime=dt.now()
dtstr=str(datetime)
dtlist=dtstr.split()
date=dtlist[0]
time=dtlist[1]
print('processing..........')
print('')
print('')
pt=[1,2,3]
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])
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)
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]
- https://en.wikipedia.org
- https://www.google.com
- https://www.chatGPT.com