0% found this document useful (0 votes)
78 views24 pages

Telephone Directory System

Uploaded by

siprasamanta416
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views24 pages

Telephone Directory System

Uploaded by

siprasamanta416
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

ARMY PUBLIC SCHOOL

BARRACKPORE

COMPUTER SCIENCE (083)


PROJECT
2025-2026
TOPIC:
TELEPHONE DIRECTORY SYSTEM
GUIDED BY:- MR. ABHISEK ROY

SUBMITTED BY :
CLASS : XII
ROLL NUMBER :
TABLE OF CONTENTS

 INTRODUCTION TO PYTHON.
 INTRODUCTION TO THE
PROJECT.
 ACKNOWLEDGEMENT.
 SYSTEM REQUIREMENTS.
 BACKEND DETAILS.
 FRONTEND DETAILS.
 MOTIVE.
 SCREEN SHOTS OF EXECUTION.
 BIBLIOGRAPHY.
 LIMITATIONS.
 CERTIFICATE.
INTRODUCTION TO 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.
History of Python:
Python is a widely used general-purpose,
high-level programming language. It was
initially designed by Guido van Rossum in
1991 and developed by Python Software
Foundation. It was mainly developed for
emphasis on code readability, and its syntax
allows programmers to express concepts in
fewer lines of code.
INTRODUCTION TO THE PROJECT

The Telephone Directory System is a


software that can be used by an
individual or any organisation to store
name, phone number, address and date
of birth of people. So this program is an
address book. It is possible to search a
person by his/her name, phone number
or date of birth. Moreover, the
application has the facility to modify
name or address based on the phone
number.
ACKNOWLEDGEMENT

I thank my Computer Science teacher Mr.


Abhisek Roy for guidance and support. I
am also thankful to our principal Mrs.
Moitreyee Mukherjee. I would also thank
to my parent for encouraging during the
course of this project. Finally, I would like
to thank CBSE for giving me this
opportunity to undertake this project.
SYSTEM REQUIREMENTS

HARDWARE REQUIREMENT:

Printer- to print the required


documents of the project.
Compact Drive
Processor: Pentium III and above
RAM: 256 MB(minimum)
Hard-Disk : 20 GB(minimum)

SOFTWARE REQUIREMENT:

 Windows 7 or higher
 My-SQL server 5.5 or higher (as
backend)
 Python IDLE 3.6 or higher or Spyder (as
frontend).
 Microsoft Word 2010 or higher for
documentation.

BACKEND DETAILS

Database Name: TELEPHONE


Code:
Create Database Telephone;
Use Telephone;

Table Name: PERSON


Attributes:
Phone_no varchar(20) Primary Key
name varchar(40)
address varchar(40)
dob date
Code:
CREATE TABLE PERSON (
Phone_no varchar(20) Primary Key,
name varchar(40),
address varchar(40),
dob date
);
FRONT-END DETAILS
PROGRAM CODE

import sys
import mysql.connector
mycon=mysql.connector.connect(host='localhost',u
ser='root',password='abhisek',database='telephone
')
mycur=mycon.cursor()

def Store():
sql="Insert into
Person(phone_no,name,address,dob)values(%s,
%s,%s,%s)"
print('\nPLEASE PROVIDE THE REQUIRED
INFORMATION\n')
ph=input('\nENTER THE MOBILE NUMBER/LAND
NUMBER TO REGISTER:')
nm=input('\nENTER THE NAME:')
addr=input('\nENTER THE AREA AND PINCODE:')
dbs=input('\nENTER DATE OF BIRTH(YYYY-MM-
DD):')
value=(ph,nm,addr,dbs)
try:
mycur.execute(sql,value)
print('RECORD ADDED SUCCESSFULLY')
mycon.commit()
except:
print('UNABLE TO INSERT!!!!!')

def Search_Phone():
ph=input('\nENTER THE MOBILE NUMBER/LAND
NUMBER TO SEARCH:')
sql="Select * from Person where phone_no=%s"
value=(ph,)
mycur.execute(sql,value)
rec=mycur.fetchone()
if(rec==None):
print('INVALID PHONE NUMBER ENTERED')
else:
print('PHONE NO','\t','NAME','\t\t','ADDRESS','\t\
t','DATE OF BIRTH')
print(rec)

def Search_Name():
nm=input('\nENTER THE NAME TO SEARCH:')
sql='Select * from Person where Name=%s'
value=(nm,)
mycur.execute(sql,value)
rec=mycur.fetchall()
if(rec==None):
print('INVALID NAME ENTERED')
else:
print('PHONE NO','\t','NAME','\t\t','ADDRESS','\t\
t','DATE OF BIRTH')
for data in rec:
print(data,'\t')
print(mycur.rowcount,'RECORD/S FOUND')

def Search_DOB():
nm=input('\nENTER THE DATE OF BIRTH TO
SEARCH:')
sql='Select * from Person where dob=%s'
value=(nm,)
mycur.execute(sql,value)
rec=mycur.fetchall()
if(rec==None):
print('WRONG DATE OF BIRTH ENTERED')
else:
print('PHONE NO','\t','NAME','\t\t','ADDRESS','\t\
t','DATE OF BIRTH')
for data in rec:
print(data,'\t')
print(mycur.rowcount,'RECORD/S FOUND')

def Update_Name():
sql="Update Person set Name=%s where
Phone_no=%s";
ph=input('\nENTER THE PHONE NUMBER WHOSE
NAME TO MODIFY:')
nm=input('\nENTER THE NEW NAME:')
value=(nm,ph)
try:
mycur.execute(sql,value)
mycon.commit()
print('RECORD UPDATED SUCCESSFULLY')
except:
print('UNABLE TO UPDATE NAME!!!!')

def Update_Address():
sql="Update Person set Address=%s where
Phone_no=%s";
ph=input('\nENTER THE PHONE NUMBER WHOSE
ADDRESS TO MODIFY:')
nm=input('\nENTER THE NEW AREA AND
PINCODE:')
value=(nm,ph)
try:
mycur.execute(sql,value)
mycon.commit()
print('RECORD UPDATED SUCCESSFULLY')
except:
print('UNABLE TO UPDATE ADDRESS!!!!')

def Remove_Person():
ph=input('\nENTER THE PHONE NUMBER TO
DELETE:')
sql='Delete from Person where Phone_no=%s'
value=(ph,)
try:
mycur.execute(sql,value)
mycon.commit()
print('RECORD DELETED SUCCESSFULLY')
except:
mycon.rollback()
print('UNABLE TO DELETE RECORD!!!')

def Close():
print('\nTHANK YOU FOR USING THE
APPLICATION')
sys.quit()

print('------------WELCOME TO TELEPHONE
DIRECTORY SYSTEM-------------\n\n')
while(True):
print('\n\nPRESS 1 TO ADD A NEW RECORD')
print('PRESS 2 TO SEARCH BY PHONE NUMBER')
print('PRESS 3 TO SEARCH BY NAME')
print('PRESS 4 TO SEARCH BY DATE OF BIRTH')
print('PRESS 5 TO CHANGE NAME')
print('PRESS 6 TO CHANGE ADDRESS')
print('PRESS 7 TO DELETE RECORD')
print('PRESS 8 TO CLOSE THE APPLICATION')
choice=int(input('ENTER YOUR CHOICE : '))
if(choice==1):
Store()
elif(choice==2):
Search_Phone()
elif(choice==3):
Search_Name()
elif(choice==4):
Search_DOB()
elif(choice==5):
Update_Name()
elif(choice==6):
Update_Address()
elif(choice==7):
Remove_Person()
elif(choice==8):
Close()

MOTIVE

 To maintain a personal profile and store


the details of a person –thus simulating
an address book.

 To search and edit details of a person


based on the unique telephone/mobile
number.

 Globalized usage.
SCREEN SHOTS OF EXECUTION
MAIN MENU

ADDING A NEW PERSON


SEARCHING PERSON BY PHONE
NUMBER

SEARCHING PERSON BY NAME


UPDATING/CHANGING NAME

UPDATING/CHANGING ADDRESS
SEARCHING A PERSON BY DOB

REMOVING AN ACCOUNT
BIBLIOGRAPHY

BOOKS:

 COMPUTER SCIENCE WITH PYTHON-


BY SUMITA ARORA
 COMPUTER SCIENCE WITH PYTHON-
BY PREETI ARORA
 PYTHON COOKBOOK

WEBSITES:
 www.geeksforgeeks.org
 https://docs.python.org/3/
 https://www.w3schools.com/python/

LIMITATIONS
 The project has no provision to
search a person by the actual
residential address.

 The project does not incorporate


the provision of identifying a person
by a unique identity card no. It may
happen that a person is possessing
two different mobile numbers.

 The project has no provision to link the


active phone number with PAN Card or
Aadhar Card No.
CERTIFICATE

This is to certify that of


class XII, Army Public School,
Barrackpore has successfully completed
his/her project in Computer Science
Practical for the AISSCE as prescribed by
CBSE in the year 2025-2026.

Roll No :

Sign. of Internal Sign. of


External

____________ _____________

You might also like