KEMBAR78
Computer Science Project | PDF | Instant Messaging | Databases
0% found this document useful (0 votes)
27 views20 pages

Computer Science Project

Class 12 Computer Science Project

Uploaded by

SUTAPA RAHA
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)
27 views20 pages

Computer Science Project

Class 12 Computer Science Project

Uploaded by

SUTAPA RAHA
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
You are on page 1/ 20

AISSCE

TECHNO INDIA GROUP PUBLIC SCHOOL

COMPUTER SCIENCE
PROJECT
Name: -
Class: -XII
Sec: -Sc
Board Roll no.: -
Session: - 2023-24
CERTIFICATE
1

This is to hereby certify that


Shreya Srivastav / Kavya Shaw of
Class XII, Section SC of Techno
India Group Public School,
Hooghly has completed her/his
Project under the supervision of
the teacher of Computer Science
department Ms. Polima Dutta.
She/He has taken proper care
and shown utmost sincerity in
completion of this project.
We certify that this project is up
to our expectation and as per the
latest guidelines issues by CBSE,
NEW DELHI.
2

_____________ _____________
__________
Internal Examiner External Examiner
Principal
Signature Signature

ACKNOWLEDGEMENT
Signature

I was only able to complete this Project


thanks to the support of numerous
individuals to whom I owe enormous
gratitude.
I would like to express my thanks to our
respected Principal Madam (Ms.
Pradeepta Chatterjee) as well as my
Computer Science teacher (Ms. Polima
Dutta) who gave me the opportunity to
do this project while researching and
completing the project, I have indeed
learnt a lot.
3

Any attempt at any level can't be


satisfactorily completed without the
support and guidance of my parents
and my friends who helped me a lot in
finalizing this project within the given
time frame.
Thank You all for your constructive
comments & valuable suggestions.

INDEX

1) Brief Overview of Project

2) Advantages of Project

3) Limitations of Project

4) Software and Hardware


requirement
4

5) Source Code

6) Output Screens

7) Future Enhancement of
Project

8) Bibliography

BRIEF OVERVIEW OF
PROJECT

The main objective of the python project


on “INSTANT MESSAGING SYSTEM” is to
make messaging system in its simplest
form, instant messaging which seeks to
accomplish two goals: monitoring
presence for the purpose of sending
presence-based alerts to users in the
chatroom and messaging. The software
establishes a direct connection between
users so they can talk to each other
synchronously, in real time.

As is commonly said, “Communication is


5

the soul of business One of the major


benefits of instant messaging in the
workplace is that it allows businesses to
communicate with each other in real time.
Business executives need to communicate
their ideas and business goals with other
executives who in turn will apps on same to
the employees. Instant messaging provides
a cost-effective and convenient way for
business to communicate. As instant

ADVANTAGES
messaging continues to evolve, more
business-friendly features will be added.

1. Real-Time Communication
Unlike emails where you have to wait for
messages to download from the server, use
of instant messaging allows you to
communicate with users in real time. This is
one of the main advantages of instant
messaging communication for businesses. If
a contact appears online, you can send and
receive messages in real time, faster than
an email response. This is particularly
useful in a business setting where clients or
customers get fast responses to questions.
6

Instant messaging could also be used for


faster internal communications too.

2. Cost Saving
With instant messaging, you can
communicate with anyone in any part of the
world without having to pay the usually
expensive international call tariffs. You
could call your suppliers abroad, make a
deal-sealing presentation via video
conferencing, hire staff in foreign countries
and conduct business internationally at
very reduced costs, relative to traditional
methods of doing this.

3. Convenient
Instant messaging provides real-time
communication that is not as intrusive as
when you’re using a phone. You can be
communication with your partner right on
your laptop while doing a number of other
things. But with a phone call, you both
would have to pause whatever you were
doing to effectively communicate with each
other.
7

4. Team Building
Instant messaging can be a good tool for
team building in a workplace, especially
where you have team members in different
locations. While words could easily be
misheard or misunderstood in phone
conversations, it is less likely if the
conversation is done via texts. This is also
helpful if one or more team members speak
with an accent that is not easily
understandable or in a noisy workplace.

--------*--------

LIMITATIONS

1. Distraction

This is the major drawback of real-time


communication. Since users expect quick
responses from you, it could easily
distract you from your regular work
8

duties. This could, in turn, lead to reduced


productivity.

2. Security

Instant messaging presents a security


threat to your business since they are third
party applications. Sometimes, these
programs become vulnerable to malicious
attacks and data are stolen or your system
is intruded into. Also, file sharing opens up
your business network to malware.

3. Viruses

Viruses and spyware could hurt your


business can easily be delivered into your
network through these third-party
applications.

4. Compatibility

There are several instant messaging


platforms out there, each with their own
peculiar network. Sadly, each
communicates, mostly, within its own
network. Communicating with different
9

users would require installing multiple


instant messaging software or using
programs that can access several
networks simultaneously like Pidgin or
Trillian.

--------*--------

REQUIREMENTS
10

1.HARDWARE RQUIREMENTS: -

 Computer, for coding and typing the


required documents of the project.
 Printer, to print the required documents
of the project.
 Compact drive.
 Processor: Pentium quad core.
 RAM: 64 MB.
 Hard disk: 20 GB.

2.SOFTWARE REQUIREMENTS: -

 Operating system: Windows 10.


 Python 3.10.4: For execution of
program.
 My SQL: For storing data in the
database.
 Python-MySQL connector: for database
connectivity and Microsoft word, for
presentation of output.

SOURCE CODE
11

# Project for Instant Message Services using


Python and MySQL Connectivity

import os
import platform
import mysql.connector
import pandas as pd

mydb = mysql.connector.connect(
host="localhost",
user="root",
passwd="tiger",
database="service"
)

def create_table():
try:
mycursor = mydb.cursor()
mycursor.execute("CREATE DATABASE service")
mycursor = mydb.cursor()
mycursor.execute("CREATE TABLE ims (msg_id
VARCHAR(10),rname VARCHAR(30),sname
VARCHAR(30),rmail VARCHAR(50),smail
VARCHAR(50),msg VARCHAR(250))")
print("Table Created")
except:
print("Databse or Table Already Created")
def add_msg():
mycursor=mydb.cursor()
msg_id=input("Enter Messae ID: ")
rname=input("Enter the Name of Receiver: ")
sname=input("Enter the Name of Sender: ")
rmail=input("Enter Receiver E-mail : ")
12

smail=input("Enter the Sender E-mail : ")


msg=input("Enter the Message : ")
sql="INSERT INTO
ims(msg_id,rname,sname,rmail,smail,msg) VALUES (%s,
%s,%s,%s,%s,%s)"
val=(msg_id,rname,sname,rmail,smail,msg)
mycursor.execute(sql,val)
mydb.commit()
print(mycursor.rowcount, "Record inserted.")
def search_msg():
mycursor=mydb.cursor()
print("Select the search criteria : ")
print("1. Message ID: ")
print("2. Name of Sender: ")
print("3. Name of Receiver: ")
print("4. All Details")
ch=int(input("Enter the choice : "))

if (ch==1):
s=input("Enter Message ID : ")
mycursor.execute("SELECT * FROM ims")
myresult = mycursor.fetchall()
for x in myresult:
if(x[0]==s):
print(x)

if(myresult):
print("No Record Found for ID: ",s)
elif (ch==2):
sn=input("Enter Sender Name : ")
mycursor.execute("SELECT * FROM ims")
myresult = mycursor.fetchall()
for x in myresult:
if(x[2]==s):
print(x)
if(myresult):
13

print("No Record Found for Sender Name: ",s)


elif (ch==3):
s=input("Enter Receiver Name : ")
mycursor.execute("SELECT * FROM ims")
myresult = mycursor.fetchall()
for x in myresult:
if(x[1]==s):
print(x)
if(myresult):
print("No Record Found for Receiver Name: ",s)
elif (ch==4):
mycursor.execute("SELECT * FROM ims")
myresult = mycursor.fetchall()
for x in myresult:
print(x)
if(myresult):
print("No Record Found !!")
def delete_msg():
mycursor = mydb.cursor()
ms=input("Enter the Message ID to be deleted : ")
sql = "DELETE FROM ims WHERE msg_id = %s"%ms
mycursor.execute(sql)
mydb.commit()
print(mycursor.rowcount, "record(s) deleted")

def Main_Menu():
print("Enter 1 : TO ADD NEW MESSAGE")
print("Enter 2 : TO SEARCH MESSAGE")
print("Enter 3 : TO DELETE MESSAGE")
print("Enter others to Exit")
try:
userInput = int(input("Please Select An Above Option:
"))
if (userInput==1):
14

print("\n")
add_msg()
elif(userInput==2):
search_msg()
elif (userInput==3):
delete_msg()
else:
print("Enter correct choice. . . ")
ch = input("\nwant to continue Y/N: ")
if(ch == 'Y' or ch=='y'):
print(os.system('cls'))
Main_Menu()
else:
print("Program going to Exit")
exit("\n! Thanks")
except():
print("Something Wrong in code")
#Main_Menu()
create_table()

------*------

OUTPUT SCREEN
15
FUTURE
16

ENHANCEMENTS

1. The process of gathering


information, diagnosing the problems,
then interpreting facts is known as
System analysis. It also includes
recommending system improvements
needed, based on the same data.

2. The system is observed as a whole;


the inputs need to be identified firstly
before turning them and then the
system is subjected to study as a whole
to identify the problem areas.

3. Although tunings any system as a


whole is a complex procedure, but
tuning individual statements is not the
best as something that is correct for
one input may hurt another inputs
performance.
17

4. The solutions are given as a


proposal. The suggestion is revised on
user request and optimal changes are
made. This loop terminates as soon as
the user is gratified with the proposal.

5. So, on the whole, system analysis


is done to improve the system
performance by monitoring it and
obtaining the best throughput possible
from it. Therefore, system analysis
plays a crucial role in designing any
system.

--------*--------
18

BIBLIOGRAPHY: -
 Computer science in
python by -SUMITA
ARORA

 https://github.com/

 https://
www.cs4school.com/
cbse/python-project-for-
class-12
19

 https://pythonworld.in/
practical-project/project-
list/

--------*--------

You might also like