Cs Project
Cs Project
Submitted By
S.ARJUN SARATI
A.VIVIN DEVANIDHI
R.YOHAN
Class : XI – B
Date :
External Examiner
Signature of Principal
2
COMPUTER SCIENCE
INVESTIGATORY PROJECT
BY:
S.ARJUN SARATI
3
A.VIVIN DEVAPRIYAN
R.YOHAN
11B
INDEX
ACKNOWLEDGEMENT 5
PROJECT
DISCRIPTION 6
IMPLEMENTAL
METHANOLOGY 7
TECHNOLOGIES USED
AND REQUIRED 9
SYSTEM DESIGN 10
FUTURE SCOPE 11
CODING 12
OUTPUT 17
4
CONCLUSION 18
REFERENCES 18
ACKNOWLEDGEMENT
5
S.ARJUN SARATI
A.VIVIN DEVANIDHI
R.YOHAN
Class : XI – B
PROJECT DISCRIPTION
6
It has its application in day to day life too.
IMPLEMENTATION
METHODOLOGY
8
TECHNOLOGIES USED
AND
REQUIRED
Software Requirements:
Python 3.x (latest version recommended)
9
A text editor (IDLE, VS Code, PyCharm, or Notepad++)
Hardware Requirements:
A computer with Windows/Linux/macOS
Minimum 2GB RAM and 100MB free storage
SYSTEM DESIGN
USER INPUT
Function
Execution
File
handling
10
Display
results
FUTURE SCOPE
GUI Interface:
Convert the text-based menu into a Graphical User
Interface (GUI) using other advanced functions
Database Integration:
Replace the text file storage with a database (SQLite,
MySQL) for better data management.(Information from
google)
11
Add options to sort contacts alphabetically or filter
contacts based on criteria (e.g., email providers).
CODING
def add_contact():
name = input("Enter Name: ")
12
print("Invalid phone number! Please enter exactly 10
digits.")
def view_contacts():
try:
file = open("contacts.txt", "r") # Open file in read mode
contacts = file.readlines()
file.close()
if len(contacts) == 0:
print("No contacts found!\n")
return
13
print("Name:", data[0], "| Phone:", data[1], "| Email:",
data[2])
print()
except FileNotFoundError:
print("No contacts found!\n")
def search_contact():
search_name = input("Enter the name to search: ").lower()
found = False
try:
file = open("contacts.txt", "r")
contacts = file.readlines()
file.close()
if not found:
14
print("Contact not found!\n")
except FileNotFoundError:
print("No contacts found!\n")
def delete_contact():
"""Deletes a contact by name."""
delete_name = input("Enter the name to delete: ").lower()
contacts = []
deleted = False
try:
file = open("contacts.txt", "r")
contacts = file.readlines()
file.close()
15
if deleted:
print("Contact deleted successfully!\n")
else:
print("Contact not found!\n")
except FileNotFoundError:
print("No contacts found!\n")
if choice == "1":
add_contact()
elif choice == "2":
16
view_contacts()
elif choice == "3":
search_contact()
elif choice == "4":
delete_contact()
elif choice == "5":
print("Exiting Contact Book. Goodbye!")
break
else:
print("Invalid choice! Please enter a number between 1-
5.\n")
OUTPUT
17
18
CONCLUSION
REFERENCES
Code is referred from Class 11 NCERT , Google and Friends.
19