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

Computer Science Project

Project on Phone List Management, including programming in Python.

Uploaded by

rahuliyer186
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 views16 pages

Computer Science Project

Project on Phone List Management, including programming in Python.

Uploaded by

rahuliyer186
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

DAV PUBLIC SCHOOL

UNIT-VIII, BHUBANESWAR

AISSCE : 2023-24
Subject:
COMPUTER SCIENCE
PROJECT
On the topic:

PHONE LIST
MANAGEMENT
Date
Prepared By:
SASWAT—SAHOO
CLASS: XII title
Course SEC: F
ROLL NO.: ________

Guided By:name
Teacher’s
NIHARIKA DASH
Certificate
This is This is to certify
to certify that Vivek SAHOO of
that SASWAT
Ranjan Sahoo of Class - XII,
Class - XII, Section – ‘F’ has successfully
Section – ‘F’ has successfully
completed the project
completed workwork
the project entitled with
“Phoneentitled
List Management”
with “Phone List under my guidance
during academic
Management” session
under2023-24 for the partial
my guidance
fulfilment of the
during requirement
academic for AISSCE
session 2023-24
Syllabusforofthe
thepartial fulfilment of the
school.
All the requirement
works of theforproject
AISSCE wasSyllabus
performed by
of theItschool.
the student. is further certified that this
All the works of the project was
project is a group work of the students.
performed by the student. It is
further certified that this project is
a group work of the students.
Ms. Niharika Dash
Date: - PGT, Computer
Ms. Niharika Dash Science
Date: -
PGT, Computer Science
External Examiner No.:
Name: _________________
External Examiner No.:
Name: _________________

Signature:
Signature:

COMPUTER PROJECT
CONTENTS

SL.
TOPIC PG. NO.
NO.
1 ACKNOWLEDGEMENT

2 INTRODUCTION

3 OBJECTIVES

4 INPUT CODE SOURCE

5 OUTPUT OF PROGRAM

6 SYSTEM IMPLEMENTATION

7 BIBLIOGRAPHY

COMPUTER PROJECT
ACKNOWLEDGEMENT

I wish to express my sincere gratitude to my Computer Science


Teacher Ms. Niharika Dash for her valuable guidance throughout
the course of this project work on “Phone List Management”. Then,
I would also like to thank my Principal Ms. Ipsita Das for
motivating to complete this project. I am also thankful to other
staffs, family members and friends, who rendered their help during
my project work within the stipulated time period.

THANK YOU!

Name: - SASWAT SAHOO


Class: - XII Section: - ‘F’
AISSCE Roll No: - ________

COMPUTER PROJECT
INTRODUCTION
In our day-to-day life we use mobile phones as a medium of
conversation, discovering new things, connecting with other people.
It shows that mobile phone has become an essential component of
life. But to run this pocket dynamite smoothly much complex
program to organise contacts is required.

Here I have tried to represent the complex system of phone list


management using simple codes in python connected with My SQL.
My program contains the following sub parts: -

1. Creating a database
In this I have written a code enabling the user to add the details
of any number of contacts with ease in an organised database.

2. Displaying database
It helps the user to display all the details of the contacts along
with the details of the person.

3. Searching a record
It enables the user to search a contact name in case he/she
wants to check the contact present in the list. It also shows the
details of the searched person if he is present in the list.

COMPUTER PROJECT
4. Updating record
It helps the user to update a contact in case a wrong input has
been provided at the time of entering the record.

5. Deleting a record
It helps the user to delete the contact in the case it is not
needed. Doing so simplifies the list of data leading to easy and
faster access to data.

6. Exit a program
It will help the user to exit the programs.

COMPUTER PROJECT
PROGRAMPR
INPUT CODE
SOURCE
import sys
import [Link]
from [Link] import Error

def createDB():
mydb=[Link](host="localhost",user= "root",\
password="tiger")
mycursor=[Link]()
[Link]("CREATE DATABASE PhoneList")
[Link]()
[Link]()
[Link]()

def createTable():
mydb=[Link](host="localhost",user="root",\
password="tiger", database="PhoneList")
mycursor=[Link]()
[Link]("CREATE TABLE Client(Name VARCHAR(25),\
phone_no BIGINT,DOB DATE,Address VARCHAR(15))")
#[Link]()
[Link]()
[Link]()

def Insert():
mydb=[Link](host="localhost",user="root",\
password="tiger", database="PhoneList")
cursor=[Link]()
Name=input("Name: ")
phone_no=int(input("Phone no: "))
DOB=input("DOB (yyyy-mm-dd): ")
Address=input("Address: ")
print()
sql="INSERT INTO Client VALUES\
('{}',{},'{}','{}')".format(Name,phone_no,DOB,Address)
[Link](sql)

COMPUTER PROJECT
[Link]()
[Link]()
[Link]()

def phnoSearch():
mydb=[Link](host="localhost",user="root",\
password="tiger", database="PhoneList")
cursor=[Link]()
A=int(input("\nEnter phone number to search:"))
sql="SELECT * FROM Client WHERE phone_no={}".format(A)
#sql="select * from Client where phone_no="+str(A)
[Link](sql)
for row in cursor:
print(row)
[Link]()
[Link]()

def AddressSearch():
mydb=[Link](host="localhost",user="root",\
password="tiger", database="PhoneList")
cursor=[Link]()
S=input("\nEnter address to search: ")
sql="SELECT * FROM Client WHERE Address='{}'".format(S)
#sql="select * from Client where Address="+str('\')+S +str('\')
[Link](sql)
data=[Link]()
for row in data:
print(row)
[Link]()
[Link]()

def YearSearch():
mydb=[Link](host="localhost",user="root",\
password="tiger", database="PhoneList")
cursor=[Link]()
year=int(input("\nEnter year to be searched: "))
sql="SELECT * FROM Client WHERE DOB like '{}%'".format(year)
[Link](sql)
for row in cursor:

COMPUTER PROJECT
print(row)
[Link]()
[Link]()

def Delete():
mydb=[Link](host="localhost",user="root",\
password="tiger", database="PhoneList")
cursor=[Link]()
A=int(input("Enter phno to delete:"))
sql="DELETE FROM Client WHERE phone_no={}".format(A)
[Link](sql)
print("Record deleted successfully\n")
[Link]()
[Link]()

def Modify():
mydb=[Link](host="localhost",user="root",\
password="tiger", database="PhoneList")
cursor=[Link]()
A=int(input("Enter phone number to update: "))
N=input("Enter correct name: ")
sql="UPDATE Client SET Name='{}'WHERE phone_no='{}'".format(N,A)
[Link](sql)
[Link]()
print("Name modified in list!\n")
[Link]()
[Link]()

def Display():
try:
db=[Link](host="localhost",user="root",\
password="tiger", database="PhoneList")
pysql=[Link]()
[Link]("SELECT * FROM Client")
data=[Link]()
for row in data:
print(row)
except Exception as e:
print(e)

COMPUTER PROJECT
return
#[Link]()->to kill execution
[Link]()
[Link]()

createDB()
createTable()
for i in range(3):
Insert()
print("Thank you for entering data.\
Please choose among the following:\n")
c=0
while c==0:
print()
print("1. Search contact")
print("2. Delete contact")
print("3. Modify name in a contact")
print("4. Display all contact details")
print("5. Exit Application")
choice=int(input("\nEnter your choice: "))
if choice==1:
print("\nSERACH PROGRESS STARTS....")
print("1. Search by phone number")
print("2. Search by address")
print("3. Search by year")
op=int(input("Enter your choice: "))
if op==1:
phnoSearch()
elif op==2:
AddressSearch()
elif op==3:
YearSearch()
else:
print("Invalid operation entered")
elif choice==2:
Delete()
elif choice==3:
Modify()
elif choice==4:
Display()
else:
print("\nThank you!")
break

COMPUTER PROJECT
OUTPUT OF THE PROGRAM
(A) INPUTING RECORD

COMPUTER PROJECT
(B) SEARCHING RECORD
i. BY PHONE NUMBER

ii. BY ADDRESS

COMPUTER PROJECT
iii. BY YEAR OF BIRTH

(C) DISPLAYING ALL RECORDS

COMPUTER PROJECT
(D) MODIFYING A RECORD

(E) DELETING A RECORD

COMPUTER PROJECT
(F) EXITING THE PROGRAM

COMPUTER PROJECT
BIBLIOGRAPHY
Sources of information for this project are-
 [Link]
 Computer Science with Python
 [Link]
 [Link]
 [Link]

COMPUTER PROJECT

You might also like