You are on page 1of 16

Computer Science Project

Tour package information


system

Submitted by
Mohammed Zuwair Ahmed
Class XII-A
Admission no: 90588

Submitted to
Mrs.farida Dawood
CONTENT
§ Introduction

§ Abstract

§ Hardware and Software


Requirements

§ Python Libraries

§ Functions Used

§ Code

§ Output

§ Conclusion
INTRODUCTION
Python is a high level, object-oriented
programming language. It was developed in
1991 by Guido Van Rossum. 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. Files are used to
store data ina storage device permanently.
The concept of file handling has stretched
over various otherlanguages, but the
implementation is either complicated or
lengthy, but like other concepts of Python,
this concept here is also easy and short.
Python treats files differently as text or
binary and this is important. Each line of
code includes a sequence of characters and
they form a 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.
ABSTRACT
The Tour Package Information System
program is a program used to store the
details of the customers as a data to display
detailed data and to search for a specific
customers detail. It can highly be used by
travel agency people. This program uses
binary file as its bases and stores values
more effectively. It uses python module,
pickle which helps in serializing and de-
serializing the object structure safely and
securely. This program isuser friendly, i.e.,
people of any age group can access it anytime
and anywhere. The goal of this project is to
develop a system for the computerization of
the Travel agencies. The common
transactions of these agencies include
customer details, tour circuit details,
categorizing & organizing the trip, payment
details, etc. are stored into the databases
and are generated according to the user
requirement.
HARDWARE AND SOFTWARE REQUIREMENTS

HARDWARE
This project uses the following
hardware:
 Modern Operating System:
 Windows 7 or 10
 Mac OS X 10.11 or higher, 64-bit
 Linux: RHEL 6/7, 64-bit
 x86 64-bit CPU (Intel / AMD architecture)
 4 GB RAM
 5 GB free disk space

SOFTWARE
This project uses the following software:
 Operating system
Ø Linux
 Program
s
Ø Python IDLE 3.6 (or newer)
Ø Notepad
PYTHON LIBRARIES

The Tour Package Information System


uses the following library:

1. Python pickle module

It is used for serializing and de-


serializing a Python object
structure. It“serializes” the
object first before writing it to
file. Pickling is a way to convert
a python object (list, dict, etc.)
into a character stream. The idea
is thatthis character stream
contains all the information
necessary to reconstruct the
object in another python script
FUNCTIONS USED

 phone(): This function is used to


input a 10- digit phone number.

 s_details(): This function is used to


input the details of consumer opting
for South India Tour.

 n_details1(): This function is used to


input the details of consumer opting
for North India Tour circuit 1.

 n_details2(): This function is used to


input the details of consumer opting
for North India Tour circuit 1.

 w_details(): This function is used to


input the details of consumer opting
for West India Tour.

 e_details(): This function is used to


input the details of consumer opting
for East India Tour.
CODE
import
pickle
s_package=[]
n_package1=[
]
n_package2=[
]
w_package=[
]
e_package=[]
def phone():
while True:
ph_no=int(input("Enter your
phone number: "))
if len(str(ph_no)) != 10:
print ("!!!Phone number is
invalid!!!")
else:
break
return ph_no
def
s_details():
ppl=int(input("Enter no.of people
:")) ph_no=phone()
ad=input("Enter your
address :")for x in
range(1,ppl+1):

sno=x
name=input("\nEnter your name :")
age=int(input("Enter your age :"))
gen=input("enter your gender :")
data=[sno,name,age,gen,ad,ph_no]

s_package.append(data)

pickle.dump(s_package,file)
def n_details1():
ppl=int(input("Enter no.of people :"))
ph_no=phone()
ad=input("Enter your
address :")for x in
range(1,ppl+1):
sno=x
name=input("\nEnter your name
:")age=int(input("Enter your age
:")) gen=input("enter your gender
:")

data=[sno,name,age,gen,ad,ph_no]
n_package1.append(data)
pickle.dump(n_package1,fi
le)def n_details2():
ppl=int(input("Enter no.of people
:"))
ph_no=phone()
ad=input("Enter your
address :")for x in
range(1,ppl+1):
sno=x

name=input("\nEnter your name :")


age=int(input("Enter your age :"))
gen=input("enter your gender :")
data=[sno,name,age,gen,ad,ph_no]
n_package2.append(data)
pickle.dump(n_package2,fi
le)def w_details():
ppl=int(input("Enter no.of people :"))
ph_no=phone()
ad=input("Enter your
address :")for x in
range(1,ppl+1):
sno=x
name=input("\nEnter your
name :") age=int(input("Enter
your age :")) gen=input("enter
your gender :")
data=[sno,name,age,gen,ad,ph_n
o] w_package.append(data)
pickle.dump(w_package,fil
e) def e_details():
ppl=int(input("Enter no.of
people :"))ph_no=phone()
ad=input("Enter your
address :")for x in
range(1,ppl+1):
sno=x
name=input("\nEnter
yourname:")
age=int(input("Enter your age
:"))

gen=input("enter your gender


:")
data=[sno,name,age,gen,ad,ph_n
o]] e_package.append(data)
pickle.dump(e_package,file)
print("x-x-x-x-x-x-x-x-x-x-x-x-x-x-x\n |Welcome
to|\n |HIRA Travels|\nx-x-x-x-x-x-x-x-x-x-x-x-
xx-x\n")
print("Planning a trip?──✈─Seek to us
first!\n")

alt="y"
while alt=="y":
print("sno","\t","name","\t","age","\t","gender",
"\t", "add ress","\t","phone number")
while True:
x=pickle.load(file
3)for i in x:
print(i[0],"\t",i[1],"\t",i[2],"\t",i[3],"\t",i[4],
"\t",i[ 5])
except EOFError:
alt=input("\nDo you want to
see the packages again?(y/n)")
file3.close()
print("\nWe celebrate our customers with
success, not failure~~visit us soon~~")
output

1.Welcome screen
x-x-x-x-x-x-x-x-x-x-x-x-x-x-x
|welcome to|
|Hira Travels|
x-x-x-x-x-x-x-x-x-x-x-x-x-x-x
planning a trip? à--Seek to us first!
1.See the plan
2.Search a
record
3.Display all the values

2.Add details
Enter your
option:1 1.south
india tour
2.north india
tour 3.west
india tour
4. east india tour

Choose your number Tour number:1

Tour Circuit
Chennai\palakkad\bangluru\chennai
\7D\8DEnter no of people:
Enter your phone number:XXXXXX
Enter your address:XXX

Enter your name:


ZuwairEnter your
age:17
Enter your gender: male

For more details contact customer service

3. Search a customer

Enter your option : 2


Enter your phone number: XXXXX
Sno name age phone no: address
1. Zuwair 17 XXXXXXX XXXXXX

4. Display all record

Enter your option:3


Sno name age gender address phone
no:
Zuwair 17 m XXXX XXXXX
Enter your phone
number:XXXXXXEnter your
address:XXX

Enter your name:


Zuwair Enter your
age:17
Enter your gender: male

For more details contact customer service

5. Search a customer

Enter your option : 2


Enter your phone number: XXXXX
Sno name age phone no: address
1. Zuwair 17 XXXXXXX XXXXXX

6. Display all record

Enter your option:3


Sno name age gender address phone
no:
Zuwair 17 m XXXX XXXXX
CONCLUSION

File handling provides a mechanism to


store the output of a program in a file
and to perform various operations on
it. A stream is an abstraction that
represents a device on which
operations of input and output are
performed. A stream can be
represented as a source or destination
of characters of indefinite length
depending on its usage. If data is small
then this processing can be doneevery
time you run the script but in case of
humongous data repetitive processing
cannotbe performed, hence the
processed data needsto be stored. This
is where data storage or writing to a
file comes in. Thus, file handling is
very important and is mostly used in
software, website and automation, etc.

You might also like