XI R GROUP 2 PROJECT (1)-1
XI R GROUP 2 PROJECT (1)-1
DIRECTORY
Submitted by:
Bimal Manoj
XI R
1
ACKNOWLEDGEMENT
Aside from my efforts, the success of any endeavor is heavily
reliant on the support and guidance of many people. I’d like to
take this opportunity to thank everyone who contributed to the
successful completion of the project I am deeply grateful to
almighty god for providing me with the strength to complete
the assignment successfully.My sincere thanks go to my parents
for their continual encouragement during this understanding I
warmly thank for the contribution of those who helped develop
my project to this level, who continue to care after me despite
my imperfections and I offer my heartful gratitude to the
luminaries .The Principal, Fr Sabu Koodapattuu CMI ,who has
been consistently inspiring and assisting us .I would like to offer
my heartful gratitude to the academician.Fr. Paulson CMI, vise
principal, for his consistent support and direction during the
endeavor My heartful gratitude goes to all my teachers who
examined my project and assisted me in resolving any issues
that arose throughout the project’s implementation The
direction and support received from all people who
participated and continue to contribute to this initiative was
critical in its success. I am appreciative of their unwavering
support and assistance
2
INDEX
3 Project Description 6
4 Source code 7
5 Output Screenshots 11
6 Bibliography 13
3
SYNOPSIS
The Python Telephone Directory project aims to
create a simple and efficient telephone
directory application using Python. The
application will allow users to add, edit, search,
and delete contacts from the directory,
providing a user-friendly interface for managing
contact information. The project will
implement various data structures and
algorithms to efficiently store and retrieve
contact information, offering a practical
example of applying fundamental programming
concepts in a real-world scenario.
4
HARDWARE AND SOFTWARE REQUIREMENT
Hardware Used
▪ Windows 7 or 10
▪ 4 GB RAM
▪ 5 GB free disk space
▪ Intel core i5 processer
▪ Hard Disk: SATA 40GB or above
▪ Keyboard and mouse
▪ Printer
▪ Interntconnection
Software used
▪ Google
▪ Python
▪ Microsoft office
▪ MySQL
5
Project Description
ADDING CONTACT
• The user can add the contact details by choosing
choice and entering the name and phone
number.
REMOVING CONTACT
• The user can remove the added contact by
entering correct details.
SEARCHING CONTACT
• The user can search the contact details from the
added contacts.
EDITING CONTACT
• The user can edit the contact details from the
added contacts.
6
Source Code
tpd={}
def add(name):
number=input("Enter phone number: ")
tpd[name]=number
while True:
if len(str(tpd[name]))!=10:
print("Invalid Phone Number")
tpd[name]=int(input("Enter phone number :
"))
else:
break
def remove(name):
tpd.pop(name)
def search(name):
s=tpd.get(name)
if s==None:
print("Invalid Name")
def edit(name):
7
print(tpd.get(name))
new=input("Enter New Phone Number:")
tpd[name]=new
ans='yes'
while ans.lower()=='yes':
print('''
1.ADD CONTACT
2.REMOVE CONTACT
3.SEARCH CONTACT
4.EDIT CONTACT
''')
choice=input("Enter a choice:")
if choice=="1":
user=input("Enter contact name:")
add(user)
print(tpd)
elif choice=="2":
8
user=input("Enter contact to be removed:")
remove(user)
print(tpd)
elif choice=="3":
user=input("Enter name to be searched:")
search(user)
print(tpd)
elif choice=="4":
name=input("Enter name to be edited:")
edit(name)
print(tpd)
else:
print("Invalid input")
9
if ans.lower() == "no":
print(tpd)
break
10
Output screenshot
Adding contact:
11
Removing contact:
Searching contact:
Editing contact:
12
BIBLIOGRAPHY
• Python 3.12
• www.wikipedia.com
13
THANK YOU
14