You are on page 1of 69

LAB REPORT

Submitted by

PAWAN SIDDH[RA2111030010109]
Under the Guidance of

Dr. Gouthaman. P

Assistant Professor, Department of Networking and Communications

In partial satisfaction of the requirements for the degree of

BACHELOR OF TECHNOLOGY
in
COMPUTER SCIENCE AND ENGINEERING

with specialization in cyber security

SCHOOL OF COMPUTING

COLLEGE OF ENGINEERING AND TECHNOLOGY


SRM INSTITUTE OF SCIENCE AND
TECHNOLOGY KATTANKULATHUR - 603203

MAY 2023
COLLEGE OF ENGINEERING & TECHNOLOGY
SRM INSTITUTE OF SCIENCE & TECHNOLOGY
S.R.M. NAGAR, KATTANKULATHUE – 603
203 Chengalpattu District

BONAFIDE CERTIFICATE

Register No. RA2111030010109 Certified to be the bonafide work done

by Pawan Kumar Siddh IIYear/IV Sem B.Tech Degree Course in the Practical

Course – 18CSC206J - Software Engineering and Project Management in

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY, Kattankulathur

during the academic year 2022 – 2023.

SIGNATURE SIGNATURE
Faculty In-Charge HEAD OF THE DEPARTMENT
Dr. Gouthaman. P Dr. Annapurani Panaiyappan. K
Assistant Professor Professor and Head,
Department of Networking and Department of Networking and Communications
Communications SRM Institute of Science and SRM Institute of Science and Technology
Technology
i

ABSTRACT

This paper presents a chatbot designed to assist students in their academic journey. The chatbot uses

natural language processing techniques to understand and respond to student queries related to various

academic domains such as course content, assignments, exams, and schedules. The chatbot can be

accessed through a variety of platforms, including web and mobile interfaces, and is designed to provide

personalized support to each student based on their individual needs. Additionally, the chatbot can learn

from previous interactions with students and improve its responses over time. The paper discusses the

design, implementation, and evaluation of the chatbot, including its effectiveness in addressing student

needs and enhancing their learning experience. The results of the evaluation suggest that the chatbot has

the potential to serve as an effective tool in supporting student learning and improving academic

outcomes.
i

TABLE OF CONTENTS

CHAPTER TITLE PAGE NO


NO

ABSTRACT
i
LIST OF FIGURES iii
1 PROBLEM STATEMENT
1
2 STAKEHOLDERS & PROCESS MODELS 6

3 IDENTIFYING REQUIREMENTS 9

4 PROJECT PLAN & EFFORT 13

5 WORK BREAKDOWN STRUCTURE


19
& RISK ANALYSIS
6 SYSTEM ARCHITECTURE, USE CASE
24
& CLASS DIAGRAM
7 ENTITY RELATIONSHIP DIAGRAM 28

8 DATA FLOW DIAGRAM 30

9 SEQUENCE & COLLABORATION


33
DIAGRAM

10 DEVELOPMENT OF TESTING
36
FRAMEWORK/USER INTERFACE
11 TEST CASES & REPORTING 39

12 ARCHITECTURE/DESIGN/FRAMEWO
43
-RK /IMPLEMENTATION

CONCLUSION 57

REFERENCES 58

APPENDIX (CODE) 59
iii
LIST OF FIGURES

FIGURE NO TITLE PAGE NO


Fig no. 1 User Interface 47
Fig no. 2 Tracking Activities 50
Fig no. 3 Admin login page 55
Fig no. 4 Admin Dashboard 56
1
2

Aim:
A chatbot for students aims to provide assistance and information to make their
academic experience more efficient and streamlined.

Team Members:
S. No Register No Name Role
1 RA2111030010124 Kartik Jindal Lead/Rep
2 RA2111030010109 Pawan Siddh Member
3 RA2111030010103 Kalash Sharma Member

Project Title: A ChatBot For SRM University Students

Project Description
 The project aims to develop a chatbot for srm students that can assist them with a variety of
tasks and information related to their academic experience
 The chatbot will be able to answer questions about class schedules, provide study resources,
and help students navigate the university website.
 The chatbot will be able to help students with administrative tasks such as registering for
classes and checking their grades.
 The chatbot will be integrated with other systems such as the student's calendar to provide
personalized and relevant information.
 The chatbot will be accessible via a website or a mobile application and will be able to
understand natural language inputs.
 The project will involve researching and analyzing the needs of students, designing the chatbot's
user interface, and developing and training the natural language processing model.
 The final product will be tested and evaluated by a group of students to ensure that it meets
their needs and is user-friendly.

Result:
The chatbot helps students access and track their grades, class schedules and other
information easily. The chatbot can be accessed through a website, mobile app, or messaging
platform and allows students to securely log in to their accounts and view their grades, class
averages, upcoming assignments, and exams. It also includes notifications and reminders for
upcoming assignments and exams.
3

DATE 23-january-2023

Kartik Jindal -- RA2111030010124

SUBMITTED BY Pawan Siddh -- RA2111030010109

Kalash Sharma -- RA2111030010103

TITLE / ROLE A ChatBot For SRM Students

THE PROJECT AIM:



Difficulty for students to access and stay updated with their grades, class schedules, and

other academic information.



 Lack of a centralized and easily accessible platform for students to access this information

 Difficulty for students to stay organized and on top of upcoming assignments and exams.

Inefficiency in the way students ask and get answers for their academic related queries

Difficulty for students to get immediate assistance in case of any academic related issues.

This project aims to develop a chatbot that will solve these problems by providing students
with a centralized and easily accessible platform to access their grades, class schedules and
other academic information, as well as provide assistance with academic-related queries,
notifications and reminders for upcoming assignments and exams, and immediate assistance
for academic related issues.
4

THE HISTORY OF CHATBOT:

 Students rely on multiple sources such as teachers, academic advisors, and the
school's website to access information about their grades, class schedules, and other
academic information.
 Students struggle to stay organized and on top of upcoming assignments and exams.
 Students often have to wait for a response or assistance with academic-related queries
APPROACH:
and issues.
 There is a lack of immediate assistance for academic-related issues.
 Strong
There ispartnership and support
a lack of a centralized from
and school
easily administration
accessible platform forand IT department
students to access all of
their academic information and resources in one place.
 Availability of a diverse set of data and information to train the chatbot
 User-centered design approach that prioritizes accessibility and usability for all
students
 Strong adoption and usage of the chatbot among students
 Scalable and maintainable chatbot architecture
 A thorough testing and evaluation plan to measure chatbot performance
 A flexible chatbot able to handle complex queries and issues
 A chatbot that supports multiple platforms and devices
 A chatbot that can adapt to changing student needs or academic policies
 A dedicated team with clearly defined roles and responsibilities
 An agile development approach that allows for regular feedback and testing
 A plan for long-term maintenance and improvement of the chatbot
 A way to measure the effectiveness and impact of the chatbot on student success.
5

BENEFITS FOR SRM UNIVERSITY:

 Improving student access to academic information and resources


 Enhancing students' organization and time management skills
 Reducing response time for academic-related queries and issues
 Providing immediate assistance for academic-related issues
 Creating a centralized and easily accessible platform for students to access all of their
academic information and resources in one place
 Improve student's academic performance and satisfaction
 Streamlining academic-related processes for school staff
 Reducing administrative workload for school staff
 Enhancing communication and collaboration among students, teachers, and school
staff
 Improving accessibility for students with different abilities or disabilities
 Enhancing the use of technology in education
 Cost-effective solution for providing academic support
 Measurable improvement in student's academic success
 Increasing student engagement with academic resources and school community
 Improving the reputation of the school and its educational services
 Improving decision-making capabilities of the school by using chatbot's data and
analytics.
6
7

Aim
To identify the appropriate Process Model for the project and prepare Stakeholder and User
Description.

Team Members:
Sl No Register No Name Role
1 RA2111030010124 Kartik jindal Representative/
project manager
2 RA2111030010109 Pawan siddh Developer
3 RA2111030010103 Kalash sharma Designer

Project Title: Identification of Process Methodology and Stakeholder Description

Methodology:
Agile methodology is chosen as the process methodology for the project.
This methodology is based on adaptive planning, iterative development, and continuous
improvement. It is well suited for projects that are complex and require flexibility and rapid
response to change.

Stakeholder Name Activity/Area/Phase Interest Influence Priority

Representing the project, Overseeing the


Initiation, Sprint project and
Project Manager Kartik High High
Planning, Sprint ensuring its
Review success
8

Coding and
implementing the
Developer Pawan Sprint Execution High High
chatbot functionality

Designing the

Designer Kalash Sprint Execution website for the Medium High


chatbot

Evaluating the
chatbot's
Professor
Educator Sprint Review relevance and Medium High
Gouthaman P
effectiveness for
students

Ensuring the
chatbot's integration
Head of Dr. Annapurani Deployment into the collage’s Low Medium
Department Panaiyappan .K
existing systems

Result
Thus the Project Methodology was identified and the stakeholders were described.
9
1

Staff Signature with date

Aim
To identify the system, functional and non-functional requirements for the project.

Team Members:
S No Register No Name Role
1 RA2111030010124 Kartik Jindal Rep/Member
2 RA2111030010109 Pawan Siddh Member
3 RA2111030010103 Kalash Sharma Member

Project Title: < Creating a Chatbot for SRM students >

System Requirements:

1→Hardware Requirements: The chatbot should be able to run on a standard computer


with sufficient RAM, CPU, and storage capacity to handle the expected number of users
and queries.

2→Software Requirements: The chatbot should be built using a programming


language and platform that are well-suited for natural language processing and AI-based
applications. It should also require a database to store user information and other data.

3→Network Requirements: The chatbot should have access to a stable and


reliable internet connection to ensure seamless operation and response times.
11

4→Integration Requirements: The chatbot should be able to integrate with SRM's


existing systems and databases, including student information systems and exam result
databases, to provide accurate and up-to-date information to students.

5→User Access Requirements: The chatbot should be accessible to SRM students via
a user-friendly interface, such as a chat window or voice-based interface. The chatbot
should be able to handle multiple channels of communication, including text and voice.

Functional Requirements:

1→User Authentication: The chatbot should have a mechanism to authenticate users based on
their SRM student credentials.

2→Information Retrieval: The chatbot should be able to provide information about various
academic and non-academic activities, events, and services offered by SRM to its students. This
information should be accurate and up-to-date.

3→Course Information: The chatbot should provide students with information about their
courses, including syllabus, course schedules, and assignments.

4→Exam Results: The chatbot should be able to retrieve students' exam results and provide
them with an overview of their performance.

5→Attendance Tracking: The chatbot should keep track of students' attendance and
provide them with updates on their attendance status.

6→Complaint Resolution: The chatbot should provide a platform for students to raise
complaints and seek resolution. The chatbot should be able to forward complaints to the
relevant authorities and provide students with updates on the status of their complaints.
1

7→FAQs: The chatbot should be able to answer frequently asked questions related to SRM
and its services.

Non-Functional Requirements:

1→User-friendly interface: The chatbot should have an easy-to-use interface that is intuitive and
accessible to all SRM students.

2→High Availability: The chatbot should be available 24/7 to cater to the needs of SRM students.

3→Fast Response Time: The chatbot should respond to user queries in a timely manner, with a
response time of less than 5 seconds.

4→Scalability: The chatbot should be able to handle a large number of users and queries
simultaneously.

5→Security: The chatbot should ensure the confidentiality and privacy of student information. All data
transmitted and stored by the chatbot should be secure and protected from unauthorized access.

6→Compatibility: The chatbot should be compatible with multiple devices, including desktop
computers, laptops, and mobile devices.

7→Maintenance: The chatbot should be easy to maintain and upgrade, with regular updates to ensure
its continued operation.

Result:
Thus the requirements were identified and accordingly described.
13
1

To Prepare Project Plan based on scope, Calculate Project effort based on resources, Find
Job roles and responsibilities

Team Members:
Sl No Register No Name Role

1 RA2111030010124 Kartik jindal Lead

2 RA2111030010109 Pawan siddh Developer


3 RA2111030010103 Kalash sharma Designer

1. Project Management Plan


Focus Area Details

Cost Management Estimate Effort


Assign Team
Budget Control

Quality Management Quality Assurance: Quality assurance will be


managed including governance
Roles and responsibilities
Tools and techniques and reporting
Quality Control: Specify the mechanisms to be used
to measure and control the quality of the work
products

Stakeholder Identifying
Analyzing
Engaging Stakeholders

Risk Management Identifying


Analyzing
Prioritizing project risks
1

2. Estimation
2.1. Effort and Cost Estimation
Task Task Description Effort Hourly Cost in
(in Rate INR
hours) (INR)

Front-End Develop user interface 170 400 68,000

Back-End Design, Develop and Unit 250 500 75,000


Test Services/API/DB

Project Planning and Organizing, coordinating, 70 250 1,75,00


Management and controlling resources
(people, time, and money)

System Design and Overall structure and 100 700 70,000


Architecture components of a software
or technology system.

Database Design Requirements analysis 80 900 72,000


and Development conceptual and logical design

Integration and Testing Implementation, testing 120 1100 1,32,000


and validation

User Acceptance Test planning, 100 1100 1,10,000


Testing and executing, defect
Deployment tracking and resolution

Contingency Risk identification, analysis, 20 1200 24,000


risk monitoring and control

Total 5,68,500
1

2.2. Infrastructure/Resource Cost [CapEx]


Infrastructure Qty Cost per qty Cost per item
Requirement

Labour Charges 20 70 (hourly) 33,600

Warehouses 1 60,000 60,000

Electricity - - 2,00,000

Packing expenses - - 41,000

Server hardware 5 60,000 3,00,000

Networking equipment 1 30,000 30,000

Software licenses - - 60,000

Total 7,24,600

2.3 Maintenance and Support Cost [OpEx]


Category Details Qty Cost per item Cost per qty
per annum

People Network, System, 3 2,000,000 20,00,000


Middleware and DB
admin Developer,
Support
Consultant

License Operating System 10 10000 1,00,000


Database Middleware
IDE

Infrastructures Server, Storage and Network 20 200000 7,000,000

User Support Help desk support - - 2,00,000


(phone, email, chat)

Contingency Unforeseen - - 5,00,000


maintenance and
support costs

Corporate Donations to government 2,50,000


Social or NGOs
Responsibility
1

Tax Taxes paid to 7,00,000


the government

3. Project Team Formation


3.1. Identification Team members
Name Role Responsibilities

Kartik jindal Key Business User Provide clear business and user
(Product Owner) requirements

Kartik jindal Project Manager Manage the project

Kalash sharma Business Analyst Discuss and Document Requirements

Pawan siddh Technical Lead Design the end-to-end architecture

Kalash sharma UX Designer Design the user experience

Kalash sharma Frontend Developer Develop user interface

Pawan siddh Backend Developer Design, Develop and Unit


Test Services/API/DB

Kartik jindal Cloud Architect Design the cost effective, highly


available and scalable architecture

Pawan siddh Cloud Operations Provision required Services

Kartik Jindal Tester Define Test Cases and Perform Testing

3.2. Responsibility Assignment Matrix


RACI Matrix Team Members

Activity Business Analyst Developer Project Manager Key


Business
User

User A C/I I R
Requirement
Documentation

Gather R C A R
requirements
and define
scope
1

Design user C A I C
interface and
user
experience

Develop C R I C
front-end code

Develop C R I C
back-end code

Integrate C R I C
front-end and
back-end code

Conduct testing C C I C/I


and quality
assurance

Deploy C R A C/I
application to
production
environment

Provide ongoing C R A C/1


maintenance
and support

A Accountable

R Responsible

C Consult

I Inform

Result:
Thus, the Project Plan was documented successfully.
19
2

Aim
To Prepare Work breakdown structure, Timeline chart and Risk identification table

Team Members:
Sl No Register No Name Role
1 RA2111030010124 Kartik Jindal Representative
2 RA2111030010109 Pawan Siddh Developer
3 RA2111030010103 Kalash Sharma Designer

WBS CHART OF CHATBOT FOR STUDENTS


2

TIMELINE – GANTT CHART


2

RISK ANALYSIS – SWOT & RMMM


2

Result:
Thus, the work breakdown structure with timeline chart and risk table were
formulated successfully.
24
2

Aim
To Design a System Architecture, Use case and Class Diagram

Team Members:
Sl No Register No Name Role
1 RA2111030010124 Kartik jindal Rep
2 RA2111030010109 Pawan siddh Developer
3 RA2111030010103 Kalash sharma Designer

System Architecture of Chabot for student


26

USE-CASE DIAGRAM
2

Class Diagram

Result:
Thus, the system architecture, use case and class diagram created successfully.
28
2

Aim
To create the Entity Relationship Diagram

Team Members:
S No Register No Name Role
1 RA2111030010124 Kartik Jindal Rep
2 RA2111030010109 Pawan Siddh Developer
3 RA2111030010103 Kalash Sharma Designer

Result: Thus, the entity relationship diagram was created successfully.


30
3

Aim
To develop the data flow diagram up to level 1 for the <project name>

Team Members:
S No Register No Name Role

1 RA2111030010124 Kartik Jindal Rep

2 RA2111030010109 Pawan Siddh Developer

3 RA2111030010103 Kalash Sharma Designer

Data Flow Diagram

The DFD takes an input-process-output view of a system. That is, data objects flow into the
software, are transformed by processing elements, and resultant data objects flow out of the
software. Data objects are represented by labeled arrows, and transformations are represented
by circles (also called bubbles). The DFD is presented in a hierarchical fashion. That is, the
first data flow model (sometimes called a level 0 DFD or context diagram) represents the
system as a whole. Subsequent data flow diagrams refine the context diagram, providing
increasing detail with each subsequent level.

The data flow diagram enables you to develop models of the information domain and
functional domain. As the DFD is refined into greater levels of detail, you perform an
implicit functional decomposition of the system. At the same time, the DFD refinement
results in a corresponding refinement of data as it moves through the processes that embody
the application.
A few simple guidelines can aid immeasurably during the derivation of a data flow diagram:
(1) Level 0 data flow diagram should depict the software/system as a
single bubble;
(2) Primary input and output should be carefully noted;
(3) Refinement should begin by isolating candidate processes, data objects, and data stores to
be represented at the next level;
(4) All arrows and bubbles should be labeled with meaningful names;
(5) Information flow continuity must be maintained from level to level and
(6) One bubble at a time should be refined. There is a natural tendency to overcomplicate the
data flow diagram. This occurs when you attempt to show too much detail too early or
represent procedural aspects of the software in lieu of information flow.
3

Result:
Thus, the data flow diagrams have been created for the chatbot for students.
33
3

Aim
To create the sequence and collaboration diagram for the <project name>

Team Members:
S No Register No Name Role

1 RA2111030010124 Kartik jindal Rep.

2 RA2111030010109 Pawan siddh Developer

3 RA2111030010103 Kalash sharma Designer

Collaborative diagram for


chat-bot for student USER

1. login 8. Logout
2.check credential

4. Match the Query with stored Question


Client
login data
7. reply to user
3.Ask query

5. provide required
data

6.Provide answer according


FAQ Event to question
database details
3

Result:
Thus, the sequence and collaboration diagrams were created for the chatbot for student.
36
3

Aim

To develop the testing framework and/or user interface framework for the chatbot for
studen
t
Team Members:
S No Register No Name Role

1 RA2111030010124 Kartik jindal Rep.

2 RA2111030010109 Pawan siddh Developer

3 RA2111030010103 Kalash sharma Designer

Test Plan:

Executive Summary:
The objective of this test plan is to define the scope, approach and testing methodology to test
the chat-bot software application . The scope of testing covers functional and non-functional
testing. The functional testing includes testing all modules, exception handling, and
automation of critical path test cases. The non-functional testing includes testing all non-
functional requirements. The testing methodology includes manual testing, and the tools
required include a Word template for documenting the test cases.

Scope of Testing:
The scope of testing for the chat-bot software application includes functional and non-
functional testing.
The functional testing will cover all the modules, exception handling, and automation of
critical path test cases.
The non-functional testing will cover all non-functional requirements such as performance,
usability, reliability, and security.

Types of Testing, Methodology, Tools:


The testing methodology for the chat-bot software application will be manual testing. The
tools required for testing will be a Word template for documenting the test cases.
3

Category Methodology Tools Required


Functional Requirements Manual Word Template
Usability Testing Manual Word Template
Performance Testing Manual Word Template
Security Testing Manual Word Template

Approach to Testing:

The approach to testing the chat-bot software application will be to create a test plan that
covers all the functional and non-functional requirements. The test plan will include test cases
that will be documented in a Word template. The test cases will be executed manually. The
testing will cover all the modules, exception handling, and automation of critical path test
cases. In addition, usability, performance, and security testing will be performed.

Conclusion:

In conclusion, this test plan defines the scope, objective, and approach to test the chatbot
software application . The testing methodology will be manual testing, and the tools required
will be a Word template for documenting the test cases. The testing will cover all the
functional and non-functional requirements, including usability, performance, and security
testing, to ensure the chatbot software application meets the needs of university students.

Result:
Thus, the testing framework/user interface framework has been created for the
chat-bot for student.
39
4

Aim

To develop the test cases manual with manual test case report for the chat-bot for
studen
t
Team Members:
S No Register No Name Role

1 RA2111030010124 KARTIK JINDAL Rep.

2 RA2111030010109 PAWAN SIDDH Developer

3 RA2111030010103 KALASH SHARMA Designer

Functional Test Cases


Test Test Test Case Execution Steps Actual Status
ID (#) Scenario Outcome
TC001 Verify Accept Valid 1. User enters valid Pass Success
Student Student student login credentials
Login Login 2. Clicks on Login button
Credentials
TC002 Verify Reject 1. User enters invalid Fail Failure
Student Invalid student login credentials
Login Student 2. Clicks on Login button
Login
Credentials
TC003 Verify Provide 1. User logs in as a student Pass Success
Query Information 2. Asks a query about
Handling on College college activities
Activities 3. Chat-bot provides
accurate and helpful
information
TC004 Verify Provide 1. User logs in as a student Pass Success
Query Information 2. Chat-bot provides
41

Handling on accurate attendance status


attendance
TC005 Verify Provide 1. User logs in as a student Pass Success
Feedback Feedback on 2. Asks a query
Mechanism Incorrect 3. Chat-bot provides an
Response incorrect response
4. Student provides
feedback on the incorrect
response

Non-Functional Test Cases


Test ID Test Test Case Execution Expected Actual Status
(#) Scenario Steps Outcome Outcome
TC01 Performance Test chat-bot 1. Simulate Chat-bot pass success
response time heavy traffic should
under heavy on the chat-bot respond
traffic 2. Record the within an
response time acceptabl
for different e time
student frame
queries even
under
heavy
traffic
TC02 Security Test chat-bot 1. Attempt to Chat-bot pass success
security against access the should
unauthorized chat-bot prevent
access without valid unauthori
student zed access
credentials and
2. Attempt to protect
access other student
4

students' data data


using own
student
credentials

Category Progress Against Plan Status


Functional Testing Green success
Non-Functional Testing amber In-progress

Functional Test Case Coverage (%) Status


Module ID 100% Completed

Non-Functional Test Case Coverage (%) Status


Module ID 70% In-progress

Result:
Thus, the test case manual and report has been created for the chat-bot for student.
43
4

Aim
To provide the details of architectural design/framework/implementation of chatbot.

Team Members:
S No Register No Name Role

1 RA2111030010124 Kartik Jindal Representative

2 RA2111030010109 Pawan Siddh Developer

3 RA2111030010103 Kalash Sharma Designer

1:USER INTERFACE CODE-->


from tkinter import *
from PIL import ImageTk, Image
from tkinter import messagebox
def Enter_pressed(event=None):
input_get = user_input.get()
print(input_get)
bot_reply = generateReply(input_get)
if len(input_get.strip()) > 0:
chat_history.insert(INSERT, '\nYou say: %s' % input_get)
if len(bot_reply.strip()) > 0:
bot_response.delete(0, END)
bot_response.insert(0, bot_reply)
chat_history.insert(INSERT, 'CODEX_PRINT_NEWLINE_CHAR_DONT_EVER_TYPE_THISBot
says: %s' % bot_reply)
user_input.delete(0, END)
chat_history.see(END)
chat_history.insert(INSERT, 'CODEX_PRINT_NEWLINE_CHAR_DONT_EVER_TYPE_THIS')
return "break"
import random
def generateReply(input):
greetings = ["Hello!", "Hi there!", "Hey!", "Greetings!"]

if any(greeting in input.lower() for greeting in ["hello", "hi", "hey",


"greetings", "good morning", "good afternoon",
4

"good evening"]):
return
random.choice(greetings) elif
"library" in input:
return "What library-related question do you have? I can help you with library
hours, checking out books, renewing
books, reserving study rooms, accessing online databases, interlibrary loans, book
borrowing periods, finding specific books,
and information about library workshops and events."
elif "hours" in input:
return "The library is open from [insert library hours]."
elif "check out" in input:
return "You can check out a book at the front desk with your library card."
elif "renew" in input:
return "Yes, you can renew your library books online through our website."
elif "study room" in input:
return "You can reserve a study room in the library through our website or by
visiting the front desk."
elif "online databases" in input:
return "You can access the library's online databases through our website with
your library card."
elif "request" in input:
return "Yes, you can request a book that the library doesn't have through our
interlibrary loan system."
elif "borrowing period" in input:
return "Yes, there is a borrowing period for each book, which varies depending on
the book's popularity and demand."
elif "find" in input:
return "You can search for a specific book in our online catalog or ask a
librarian for assistance."
elif "workshops" in input or "events" in input:
return "Yes, the library offers a variety of workshops and events throughout the
year. You can check our website or
ask a librarian for more information."
else:
return "I'm sorry, I didn't quite understand. Could you please rephrase your
question?"
def clear_chat():
chat_history.delete('1.0', END)
bot_response.delete(0, END)
root = Tk()
root.title('AI for LIBERARY') root.iconbitmap('C:\Users\
pawan\Desktop\testing\favi.ico') # root.maxsize(700,700)
# root.minsize(700,700)
root.configure(background='#0096DC')
img = Image.open('download.png')
resized_img = img.resize((70,70))
img = ImageTk.PhotoImage(resized_img)
4

img_label = Label(root,image=img)
img_label.pack(pady=(10,10))
text_label = Label(root,text='CHATBOT',fg='white',bg='#0096DC')
text_label.pack()
text_label.config(font=('verdana',24))
user_input = Entry(root,width=50)
user_input.pack(ipady=6,pady=(1,15))
bot_response = Entry(root,width=50)
bot_response.pack(ipady=6,pady=(1,15))
btn_send = Button(root,text='Send', command=Enter_pressed, width=10, height=2)
btn_send.place(relx=0.57, rely=0.95, anchor='s')
btn_clear = Button(root, text='Clear', command=clear_chat, width=10, height=2)
btn_clear.place(relx=0.43, rely=0.95, anchor='s')
chat_history = Text(root)
chat_history.pack()
root.mainloop()

WORKING-->

This is a Python code that creates a simple chat-bot GUI using the tkinter library. The chatbot
is designed to respond to user input based on a set of pre-defined rules. The chat-bot can
answer questions related to collage services, such as activities, FAQ’s,

The GUI consists of an input box where users can type their messages, a "Send" button to
submit the message, a chat history window to display the conversation between the user and
the chatbot, and a "Clear" button to clear the chat history window.

When the user types a message and presses the "Send" button or the "Enter" key, the
program processes the input message and generates a response based on the pre-defined
rules. The chat history window is then updated with the user's message, the catboat's
response, and a blank line to separate the messages.

The "Clear" button allows the user to clear the chat history window and start a new
conversation
4

SCREENSHOT-->
4

2:TRACKING ATTENDANCE , RESULT AND ACTIVITIES….


CODE:
import tkinter as tk
import webbrowser
from tkinter import *
from PIL import ImageTk, Image
from tkinter import messagebox
root = tk.Tk()
root.geometry("300x200")
root.title('SRM Institute of Science and Technology') root.iconbitmap('C:\Users\
pawan\Desktop\chatbot for student\images\srm logo.ico')
root.configure(background='#0096DC')
# img = Image.open('srm_logo.png')
# resized_img = img.resize((70,70))
# img = ImageTk.PhotoImage(resized_img)
logo = tk.PhotoImage(file="images\Srmseal.png")
logo_label = tk.Label(root, image=logo)
logo_label.pack(side="top", pady=10)
# Define functions to connect to websites
def connect_to_attendance():
webbrowser.open("https://q.srmcheck.me/attendance")
def connect_to_results():
webbrowser.open("https://q.srmcheck.me/marks")
def connect_to_events():
webbrowser.open("https://academia.srmist.edu.in/#Academic_Reports")
# Add buttons for attendance, results, and events
bg_image = tk.PhotoImage(file="images\campus.png")
background_label = tk.Label(root, image=bg_image)
background_label.place(relwidth=1, relheight=1)
root.maxsize(500,500)
root.minsize(500,500)
btn_send = Button(root, text='attaindance', command=connect_to_attendance,
width=15, height=3)
4

btn_send.place(relx=0.20, rely=0.95, anchor='s')


btn_clear = Button(root, text='Result', command=connect_to_results, width=15,
height=3)
btn_clear.place(relx=0.50, rely=0.95, anchor='s')
btn_clear = Button(root, text='events', command=connect_to_events, width=15,
height=3)
btn_clear.place(relx=0.80, rely=0.95, anchor='s')
root.mainloop()

WORKING:
This code creates a GUI window with three buttons labeled as "Attendance", "Result", and
"Activities". When any of these buttons are clicked, a specific function is called that opens a web
page related to that particular button.

The "Attendance" button, when clicked, connects to the "https://q.srmcheck.me/attendance"


URL using the webbrowser library. This URL shows the attendance record of the student at SRM
Institute of Science and Technology.

The "Result" button, when clicked, connects to the "https://q.srmcheck.me/marks" URL using
the webbrowser library. This URL shows the result of the student at SRM Institute of Science
and Technology.

The "Activities" button, when clicked, connects to the


"https://academia.srmist.edu.in/#Academic_Reports" URL using the webbrowser library. This
URL shows the academic planner chart that includes all the academic activities and events
scheduled by SRM Institute of Science and Technology.

Therefore, this code provides a simple way for students to check their attendance, results, and
academic activities by clicking on these buttons in the GUI window.
5

SCREENSHOOT:
5

3: ADDING DATA AND UPDATING DATA:


import tkinter as tk
import sqlite3
# Initialize database connection
conn = sqlite3.connect('data.db')
c = conn.cursor()
# Create table to store chatbot data
c.execute('''CREATE TABLE IF NOT EXISTS chatbot_data
(id INTEGER PRIMARY KEY, question TEXT, answer TEXT)''')
# Function to add new chatbot data
def add_data(question, answer):
c.execute("INSERT INTO chatbot_data (question, answer) VALUES (?, ?)", (question,
answer))
conn.commit()
# Function to retrieve chatbot data
def get_data(question):
c.execute("SELECT answer FROM chatbot_data WHERE question=?", (question,))
result = c.fetchone()
return result[0] if result else None
# Function to update chatbot data
def update_data(id, question, answer):
c.execute("UPDATE chatbot_data SET question=?, answer=? WHERE id=?", (question,
answer, id))
conn.commit()
# Function to authenticate admin
def admin_login(username, password):
if username == "admin" and password == "password":
return True
else:
return False
# Function to handle admin commands
def handle_admin_command():
5

username = admin_username.get()
password = admin_password.get()
if admin_login(username, password):
admin_window = tk.Toplevel(root)
admin_window.title("Admin Dashboard")
# Add data form
add_frame = tk.Frame(admin_window)
add_frame.pack(pady=10)
add_question_label = tk.Label(add_frame, text="Question:")
add_question_label.grid(row=0, column=0)
add_question_entry = tk.Entry(add_frame, width=50)
add_question_entry.grid(row=0, column=1)
add_answer_label = tk.Label(add_frame, text="Answer:")
add_answer_label.grid(row=1, column=0)
add_answer_entry = tk.Entry(add_frame, width=50)
add_answer_entry.grid(row=1, column=1)
add_button = tk.Button(add_frame, text="Add", command=lambda:
add_data(add_question_entry.get(),
add_answer_entry.get()))
add_button.grid(row=2, column=1)
# Update data form
update_frame = tk.Frame(admin_window)
update_frame.pack(pady=10)
update_id_label = tk.Label(update_frame, text="ID:")
update_id_label.grid(row=0, column=0)
update_id_entry = tk.Entry(update_frame, width=50)
update_id_entry.grid(row=0, column=1)
update_question_label = tk.Label(update_frame, text="Question:")
update_question_label.grid(row=1, column=0)
update_question_entry = tk.Entry(update_frame, width=50)
update_question_entry.grid(row=1, column=1)
update_answer_label = tk.Label(update_frame, text="Answer:")
5

update_answer_label.grid(row=2, column=0)
update_answer_entry = tk.Entry(update_frame, width=50)
update_answer_entry.grid(row=2, column=1)
update_button = tk.Button(update_frame, text="Update", command=lambda:
update_data(update_id_entry.get(),
update_question_entry.get(), update_answer_entry.get()))
update_button.grid(row=3, column=1)
else:
error_label.config(text="Invalid username or password. Try again.")
# Function to handle chatbot conversation
def handle_chatbot():
question = user_input.get()
# Retrieve answer from database
answer = get_data(question)
if answer:
chatbot_response.config(text=answer)
else:
chatbot_response.config(text="I'm sorry, I don't know the answer to that. Can you
ask me something else?")
# Create root window
root = tk.Tk()
root.title("Chatbot")
# Create user input form
user_input_frame = tk.Frame(root)
user_input_frame.pack(pady=10)
user_input_label = tk.Label(user_input_frame, text="You:")
user_input_label.grid(row=0, column=0)
user_input = tk.Entry(user_input_frame, width=50)
user_input.grid(row=0, column=1)
user_input_button = tk.Button(user_input_frame, text="Send",
command=handle_chatbot)
user_input_button.grid(row=0, column=2)
5

# Create chatbot response form


chatbot_response_frame = tk.Frame(root)
chatbot_response_frame.pack(pady=10)
chatbot_response_label = tk.Label(chatbot_response_frame, text="Chatbot:")
chatbot_response_label.grid(row=0, column=0)
chatbot_response = tk.Label(chatbot_response_frame, text="")
chatbot_response.grid(row=0, column=1)
# Create admin login form
admin_login_frame = tk.Frame(root)
admin_login_frame.pack(pady=10)
admin_username_label = tk.Label(admin_login_frame, text="Username:")
admin_username_label.grid(row=0, column=0)
admin_username = tk.Entry(admin_login_frame, width=50)
admin_username.grid(row=0, column=1)
admin_password_label = tk.Label(admin_login_frame, text="Password:")
admin_password_label.grid(row=1, column=0)
admin_password = tk.Entry(admin_login_frame, width=50, show="*")
admin_password.grid(row=1, column=1)
admin_button = tk.Button(admin_login_frame, text="Login",
command=handle_admin_command)
admin_button.grid(row=2, column=1)
error_label = tk.Label(admin_login_frame, text="")
error_label.grid(row=3, column=1)
# Start main loop
root.mainloop()

WORKING:
This is a Python script for a simple chatbot application with an admin dashboard. The chatbot
responds to user input by retrieving answers from a SQLite database. The admin dashboard
allows an administrator to add or update data in the database.
5

The script initializes a database connection and creates a table to store chatbot data. It includes
functions to add, retrieve, and update data in the database. There is also a function to
authenticate admin login and handle admin commands.

The root window includes a form for user input and a form to display chatbot responses. There
is also an admin login form. When the user submits a question, the script retrieves the answer
from the database and displays it in the chatbot response form.

If an admin successfully logs in, the script opens a new window for the admin dashboard. The
dashboard includes forms for adding or updating data in the database.

The main loop of the script runs the Tkinter GUI and waits for user input.
SCREENSHOTS:
5

Result:
Thus, the details of architectural design/framework/implementation along with the
screenshots were provided.
5

Conclusion:-
The chatbot for student project has been designed to provide personalized support and guidance

to students throughout their academic journey. Through our interaction, I hope that you have

found the chatbot experience to be informative, helpful, and tailored to your unique needs and

preferences.

As a chatbot, our main goal is to assist students with their academic and personal challenges.

From time management, study strategies, to career advice, we have provided relevant and

practical solutions to help you achieve your academic goals.

It is essential to remember that education is a lifelong journey that requires dedication,

perseverance, and hard work. The chatbot has been designed to support and guide you along the

way, offering personalized insights and strategies that will benefit you in your academic and

personal life.

As technology continues to advance, the chatbot for student project serves as an example of how

we can leverage technology to enhance the learning experience and support students in their

academic journey. With the right mindset, attitude, and support, you can achieve your goals and

realize your dreams.

I hope that the chatbot has been a valuable tool in your academic journey, and that you will

continue to use it as a source of inspiration, motivation, and guidance. Thank you for using the

chatbot for student project, and I wish you all the best in your future endeavors.
5

References:
Alepis, E., & Virvou, M. (2011). Automatic generation of emotions in tutoring agents for
affective e-learning in medical education. Expert Systems with Applications, 38(8):
9840–9847.

Ashok, G., Brian, C., Mithun, K., Shanu, S., Abhinaya, S., & Bryan, W. (2015). Using Watson
for Enhancing Human-Computer Co-Creativity. AAAI Symposium: 22–29.

Avalverde, D. (2019). A Brief History of Chatbots. Perception, Control, Cognition.


Retrieved March 9, 2019 from: https://pcc.cs.byu.edu/2018/03/26/a-brief-history-of-
chatbots/

Ayedoun, E., Hayashi, Y., & Seta, K. (2015). A Conversational Agent to Encourage
Willingness to Communicate in the Context of English as a Foreign Language. Procedia
Computer Science, 60(1): 1433–1442.

Ben Mimoun, Mohammed Slim, & Poncin, I. (2015). A valued agent: How ECAs affect
website customers' satisfaction and behaviors. Journal of Retailing and Consumer
Services, 26: 70– 82.

Chatbot Magazine (2019). A Visual History of Chatbots. Retrieved March 9, 2019 from:
https://chatbotsmagazine.com/a-visual-history-of-chatbots-8bf3b31dbfb2

Colace, F., De Santo, M., Lombardi, M., Pascale, L., Pietrosanto, A. (2018). Chatbot for E-
Learning: A Cases Study. International Journal of Mechanical Engineering and Robotics
Research Vol. 7, No. 5, September.

Egencia (2018). What is a Chatbot and How does it work? Retrieved March 9, 2019 from:
https://www.youtube.com/watch?v=38sL6pADCog

Hattie, J. (2012). Visible learning for teachers: Maximizing impact on learning: Routledge.
https://chatbotsmagazine.com/a-visual-history-of-chatbots-8bf3b31dbfb2

Lip ko, H. (2018). Meet Jill Watson: Georgia Tech's first AI teaching assistant. Retrieved
on March 9, 2019 from: https://pe.gatech.edu/blog/meet-jill-watson-georgia-techs-
first-ai-teaching-assistant.
5

from ast import Add


from tkinter import
*
from PIL import ImageTk,
Image from tkinter import
messagebox import random
import tkinter as
tk import sqlite3
import webbrowser

def Enter_pressed(event=None):
input_get = user_input.get().lower() # convert user input to lowercase
print(input_get)
bot_reply =
get_data(input_get) if
len(input_get.strip()) > 0:
chat_history.insert(INSERT, '\nYou say: %s' %
input_get) if len(bot_reply.strip()) > 0:
bot_response.delete(0, END)
bot_response.insert(0, bot_reply)
chat_history.insert(INSERT, 'CODEX_PRINT_NEWLINE_CHAR_DONT_EVER_TYPE_THISBot says: %s' % bot_reply)
user_input.delete(0, END)
chat_history.see(END)
chat_history.insert(INSERT,
'CODEX_PRINT_NEWLINE_CHAR_DONT_EVER_TYPE_THIS') return "break"

# Initialize database connection


conn =
sqlite3.connect('data.db') c =
conn.cursor()

# Create table to store chatbot data


c.execute('''CREATE TABLE IF NOT EXISTS chatbot_data
(id INTEGER PRIMARY KEY, question TEXT, answer TEXT)''')

# Function to add new chatbot data

def add_data(question,
answer): c.execute(
"INSERT INTO chatbot_data (question, answer) VALUES (?, ?)", (question,
answer)) conn.commit()

# Function to retrieve chatbot data


def get_data(question):
c.execute("SELECT answer FROM chatbot_data WHERE question=?",
(question,)) result = c.fetchone()
return result[0] if result else "I'm sorry, I don't know the answer to that. Can you ask me something else?"

# Function to update chatbot data


def update_data(id, question, answer):
c.execute("UPDATE chatbot_data SET question=?, answer=? WHERE
id=?", (question, answer, id))
conn.commit()

# Function to authenticate admin

def admin_login(username, password):


if username == "admin" and password ==
"password": return True
else:
return False
6
# Function to handle admin commands
def handle_admin_command():
6
username =
admin_username.get() password
= admin_password.get()
if admin_login(username, password):
admin_window = tk.Toplevel(root)
admin_window.title("Admin Dashboard")
admin_window.configure(background='#0096DC'
) admin_window.maxsize(400, 400)
admin_window.minsize(400, 400)

# Add data form


add_frame =
tk.Frame(admin_window)
add_frame.pack(pady=10)
add_question_label = tk.Label(add_frame,
text="Question:") add_question_label.grid(row=0,
column=0)
add_question_entry = tk.Entry(add_frame,
width=50) add_question_entry.grid(row=0,
column=1)
add_answer_label = tk.Label(add_frame,
text="Answer:") add_answer_label.grid(row=1,
column=0)
add_answer_entry = tk.Entry(add_frame,
width=50) add_answer_entry.grid(row=1,
column=1)
add_button = tk.Button(add_frame, text="Add", command=lambda:
add_data( add_question_entry.get(), add_answer_entry.get()))
add_button.grid(row=2, column=1)

# Update data form


update_frame =
tk.Frame(admin_window)
update_frame.pack(pady=10)
update_id_label = tk.Label(update_frame,
text="ID:") update_id_label.grid(row=0, column=0)
update_id_entry = tk.Entry(update_frame,
width=50) update_id_entry.grid(row=0, column=1)
update_question_label = tk.Label(update_frame,
text="Question:") update_question_label.grid(row=1, column=0)
update_question_entry = tk.Entry(update_frame,
width=50) update_question_entry.grid(row=1, column=1)
update_answer_label = tk.Label(update_frame,
text="Answer:") update_answer_label.grid(row=2, column=0)
update_answer_entry = tk.Entry(update_frame,
width=50) update_answer_entry.grid(row=2, column=1)
update_button = tk.Button(update_frame, text="Update", command=lambda:
update_data( update_id_entry.get(), update_question_entry.get(),
update_answer_entry.get()))
update_button.grid(row=3, column=1)

else:
error_label.config(text="Invalid username or password. Try again.")

def clear_chat():
chat_history.delete('1.0',
END) bot_response.delete(0,
END)

# =========================================================================================================#
# Main chatbot interface

root = Tk()

root.title('SRM Institute of Science and Technology')


root.iconbitmap('C:\Users\pawan\Desktop\chatbot for student\srm logo.ico')

root.maxsize(700, 700)
root.minsize(700, 700)

root.configure(background='#0096DC'
6
) img = Image.open('Srmseal.png')
resized_img = img.resize((70, 70))
img = ImageTk.PhotoImage(resized_img)

img_label = Label(root,
image=img)
img_label.pack(pady=(10, 10))
6
text_label = Label(root, text='SRM AI', fg='white',
bg='#0096DC') text_label.pack()
text_label.config(font=('verdana', 24))

user_input = Entry(root, width=50)


user_input.pack(ipady=6, pady=(1, 15))

bot_response = Entry(root, width=50)


bot_response.pack(ipady=6, pady=(1, 15))

btn_send = Button(root, text='Send', command=Enter_pressed, width=10,


height=2) btn_send.place(relx=0.57, rely=0.95, anchor='s')

btn_clear = Button(root, text='Clear', command=clear_chat, width=10,


height=2) btn_clear.place(relx=0.43, rely=0.95, anchor='s')

chat_history =
Text(root)
chat_history.pack()

# binds the Enter key to the Enter_pressed function


root.bind('<Return>', Enter_pressed)

# ================================================================================================================#

# admin window
root = tk.Tk()
root.title("SRM AI")
root.iconbitmap('C:\Users\pawan\Desktop\chatbot for student\srm logo.ico')

root.maxsize(700, 700)
root.minsize(700, 700)

root.configure(background='#0096DC')
text_label = Label(root, text='SRM ADMIN LOGIN', fg='white',
bg='#0096DC') text_label.pack()
text_label.config(font=('verdana', 24))

# Create admin login form


admin_login_frame =
tk.Frame(root)
admin_login_frame.pack()
admin_username_label = tk.Label(admin_login_frame,
text="Username:") admin_username_label.grid(row=0, column=0)
admin_username = tk.Entry(admin_login_frame,
width=50) admin_username.grid(row=0, column=1)
admin_password_label = tk.Label(admin_login_frame,
text="Password:") admin_password_label.grid(row=1, column=0)
admin_password = tk.Entry(admin_login_frame, width=50,
show="*") admin_password.grid(row=1, column=1)
admin_button = tk.Button(
admin_login_frame, text="Admin Login",
command=handle_admin_command) admin_button.grid(row=2, column=1)
error_label = tk.Label(admin_login_frame,
text="") error_label.grid(row=3, column=1)

# =================================================================================================================#

root.title('SRM Institute of Science and Technology')


root.iconbitmap('C:\Users\pawan\Desktop\chatbot for student\srm

logo.ico') root.configure(background='#0096DC')

# Define functions to connect to websites

def connect_to_attendance():
webbrowser.open("https://q.srmcheck.me/attendance")
6

def connect_to_results():
webbrowser.open("https://q.srmcheck.me/marks")

def connect_to_events():
webbrowser.open("https://academia.srmist.edu.in/#Academic_Reports")

# Add buttons for attendance, results, and events

root.maxsize(500, 500)
root.minsize(500, 500)

btn_send = Button(root, text='attaindance',


command=connect_to_attendance, width=15, height=3) btn_send.place(relx=0.20, rely=0.95, anchor='s')

btn_clear = Button(root, text='Result',


command=connect_to_results, width=15, height=3) btn_clear.place(relx=0.50, rely=0.95, anchor='s')

btn_clear = Button(root, text='events',


command=connect_to_events, width=15, height=3) btn_clear.place(relx=0.80, rely=0.95, anchor='s')

# Start main loop


root.mainloop()

You might also like