0% found this document useful (0 votes)
14 views12 pages

Python Chatbot Project Report

K. Kavin Lakshmanan, a student at JGVV School, submitted a Computer Science project on a chatbot developed using Python for the 2025-2026 session. The project includes original work, a certificate of completion, acknowledgments, source code, and hardware/software specifications. The chatbot, named Jarvis, is designed to respond to user commands and queries through a graphical user interface.

Uploaded by

aravindhraj470
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)
14 views12 pages

Python Chatbot Project Report

K. Kavin Lakshmanan, a student at JGVV School, submitted a Computer Science project on a chatbot developed using Python for the 2025-2026 session. The project includes original work, a certificate of completion, acknowledgments, source code, and hardware/software specifications. The chatbot, named Jarvis, is designed to respond to user commands and queries through a graphical user interface.

Uploaded by

aravindhraj470
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

I, K.

Kavin laskhmanan, a student of


class-XI, section-‘A’ of JGVV SCHOOL,
ANNA NAGAR,
hereby submit the project entitled “A
COMPUTER SCIENCE PROJECT ON
CHAT BOT(USING PYTHON
PROGRAMMING LANGUAGE IN Spyder
IDLE)” for Computer Practical of
session 2025 -[Link] project report
consists of original wo rk done by me
under the able guidance of my
computer teacher, Manjula Mam.

DATE STUDENT’S SIGNATURE

D
This is to certify that [Link]
Lakshmanan of class-XI, section-A,
Roll No.-11A14 has successfully
completed his Computer Science
Report File for session 2025-2026 as
per C.B.S.E Guidelines.

Internal signature External signature

Supervisor Signature
I would like to express my sincere gratitude to all
those who supported and guided me throughout the
completion of this Computer Science project. Special
thanks to my faculty advisor for their valuable
insights and encouragement, and to my peers and
family for their continuous support. This project has
been a great learning experience, and I am thankful
for the opportunity to explore and apply key
concepts in the field .

STUDENT’S SIGNATURE
1. DECLARATION PAGE
2. CERTIFICATE
3. ACKNOWLEDGEMENT

4. SOURCE CODE
5. OUTPUT(SCREENSHOT)
6. BIBLIOGRAPHY
import tkinter as tk

from tkinter import scrolledtext


import datetime, math

# Smart command handler


def handle_command(cmd):
cmd = [Link]().strip()

if not cmd:
return "Please type something so I can respond."

# Greetings
if cmd in ("hi", "hello", "hey"):
return "Hello! I'm Jarvis. How can I assist you today?"

# Time and date


if "time" in cmd:
return [Link]().strftime("The current time
is %I:%M %p.")
if "date" in cmd:
return [Link]().strftime("Today's date is
%d %B %Y.")

# Name recognition
if "my name is" in cmd:
name = [Link]("my name is", "").strip().title()
return f"Nice to meet you, {name}. What would you like me
to do?"

# Questions
if [Link]("what is") or [Link]("who is") or
[Link]("how"):
return f"That's a great question. Here's what I understood:
'{cmd}'."

# App launching
import os
import subprocess

# 🔍 Extract app name from command


def extract_app_name(cmd):
keywords = ["open", "launch", "start"]
for word in keywords:
if word in cmd:
return [Link](word, "").strip().lower()
return [Link]().lower()

# 🔎 Search for matching .exe file


def find_exe(app_name):
search_dirs = [
r"C:\Program Files",
r"C:\Program Files (x86)",
[Link]("~\\AppData\\Local\\Programs"),
[Link]("~\\AppData\\Local") # Covers
Google Chrome, etc.
]
for folder in search_dirs:
try:
for root, dirs, files in [Link](folder):
for file in files:
if app_name in [Link]() and [Link](".exe"):
return [Link](root, file)
except Exception as e:
print(f"Skipping {folder}: {e}")
return None

# 🚀 Launch the app


def launch_app_by_name(cmd):
app_name = extract_app_name(cmd)
exe_path = find_exe(app_name)
if exe_path:
try:
[Link](exe_path)
return f"Launching {[Link](exe_path)}..."
except Exception as e:
return f"Failed to launch {app_name}: {e}"
else:
return f"Sorry, I couldn't find an app named '{app_name}'."

# 🧠 Integrate into your command handler


def handle_command(cmd):
cmd = [Link]().strip()
if not cmd:
return "Please type something so I can respond."

if cmd in ("hi", "hello", "hey"):


return "Hello! I'm Jarvis. How can I assist you today?"

if "time" in cmd:
import datetime
return [Link]().strftime("The current time
is %I:%M %p.")

if "date" in cmd:
import datetime
return [Link]().strftime("Today's date is
%d %B %Y.")

if "my name is" in cmd:


name = [Link]("my name is", "").strip().title()
return f"Nice to meet you, {name}. What would you like me
to do?"

if [Link]("open") or [Link]("launch") or
[Link]("start"):
return launch_app_by_name(cmd)

if cmd in ("bye", "exit", "quit"):


return "Goodbye! Shutting down..."

return f"You said: '{cmd}'. Got it. Let me know what you'd
like me to do next."

# GUI setup
class JarvisApp:
def __init__(self, root):
[Link] = root
[Link]("Jarvis ChatBot")
[Link]("600x500")
[Link](bg="#0f0f0f")
[Link](False, False)

# Animated Jarvis core


[Link] = [Link](root, width=120, height=120,
bg="#0f0f0f", highlightthickness=0)
[Link](x=240, y=20)
[Link] = [Link].create_oval(10, 10, 110, 110,
fill="#00E5FF", outline="")
self.pulse_state = 0
self.animate_pulse()

# Chat display
self.chat_area = [Link](
root, wrap=[Link], bg="#1a1a1a", fg="white",
font=("Helvetica", 11)
)
self.chat_area.place(x=20, y=160, width=560, height=240)
self.chat_area.configure(state="disabled")

# Entry field
[Link] = [Link](
root, font=("Helvetica", 12), bg="#2a2a2a", fg="white",
insertbackground="white", insertwidth=2
)
[Link](x=20, y=420, width=460, height=30)
[Link]("<Return>", self.send_message)
[Link].focus_set()

# Send button
send_btn = [Link](
root, text="Send", command=self.send_message,
bg="#00ADB5", fg="white", font=("Helvetica", 10)
)
send_btn.place(x=500, y=420, width=80, height=30)

[Link]("Jarvis", "Hello! I'm Jarvis. Type anything — a


question, a command, or just say hi.")

def post(self, who, msg):


self.chat_area.configure(state="normal")
self.chat_area.insert([Link], f"{who}: {msg}\n")
self.chat_area.configure(state="disabled")
self.chat_area.see([Link])

def send_message(self, event=None):


user_input = [Link]().strip()
if not user_input:
return
[Link](0, [Link])
[Link]("You", user_input)
response = handle_command(user_input)
[Link]("Jarvis", response)
if user_input.lower() in ("exit", "quit", "bye"):
[Link](1000, [Link])

def animate_pulse(self):
self.pulse_state = (self.pulse_state + 1) % 60
r = 50 + int(6 * (1 + [Link](self.pulse_state / 10)))
[Link]([Link], 60 - r/2, 60 - r/2, 60 + r/2, 60
+ r/2)
[Link](100, self.animate_pulse)

# Run the app


if __name__ == "__main__":
root = [Link]()
app = JarvisApp(root)
[Link](
SOURCE CODE
HARDWARE USED:
 Printer to print the project report
 Computer device with following hardware
specifcations : Intel(R) Core(TM) i3-3210 CPU @
3.15GHz (3.15 GHz) 4.0 GB (4.0 GB usable) 64-bit
operating system, x64-based processor Windows
11 Pro
SOFTWARE USED:
 Operating System: Windows 11
 Python IDLE (3.13)
 Anaconda Navigator (Launching Spyder)
 Microsoft Office Word for Report
Making
RESOURCE HELPED USED:
 Computer Science Book by Sumita Arora
 [Link]
 [Link]
 [Link]
CHAT BOT

QUARTYEARLY EXAMINATION
2025 - 2026

:Sumitted by :
[Link]
Roll No:11A14

You might also like