Python Final AAT Report
Python Final AAT Report
PYTHON PROJECT
REPORT ON
SUBMITTED BY
Thanushree RN(1BM23MC104)
Tejaswini N(1BM23MC103)
Vaishnavi(1BM23MC108)
Page |
23MCA1PCPY:Python
CERTIFICATE
This is to certify that Python report entitled “Student Result Management
System” a bonafide work carried out by team members:Thanushree R
N(1BM23MC104),Tejaswini N(1BM23MC103),Vaishnavi(1BM23MC108)
students of Master of Computer Applications Department, BMS College
of Engineering. This report has been submitted during the academic year
2023-2024 in partial fulfillment of the degree of Master of Computer
Applications 1st Semester.
Page | 2
[Type here]
Place: Bangalore
Page |
[Type
ACKNOWLEDGEMENT
With great pleasure, first and foremost, we thank all the gracious people
for their encouragement which gave us the strength to complete this
project work successfully. We are grateful to BMS COLLEGE OF
ENGINEERING for providing us a platform to carry out this project. We
wish to thank our professor, Dr. S . Uma for providing us an opportunity
to work and supporting us in every aspect of the course.
We extend our sincere thanks to our Project Guide Dr. S . Uma, Associate
Professor, Department of Computer Applications, who was instrumental
in our project work and provided us with precious guidance and
encouragement at every step. Lastly, we express faithful gratitude and
hearty thanks to our parents and friends who were equally responsible in
providing the much-needed support and all the people who helped us in
the successful completion of our project work.
Page | 3
23MCA1PCPY:Python
Problem Definition:
The Student Result Management System is a Python project designed to streamline the process of
managing student results in educational institutions. It automates the recording, calculation, and
management of student data, allowing administrators to efficiently record student information
such as IDs, names, classes. with the system automatically calculating total marks, and
percentages.
Additionally, the system offers analysis tools for evaluating student performance and
generates detailed reports, including mark sheets and analytics reports, which can be exported
in various formats. Access control and authentication mechanisms ensure the security of
student data, permitting only authorized users to access and modify information.
DataBase:
SQLite3:
SQLite3 is a self-contained, serverless, and lightweight SQL database engine that is easy to
set up and ideal for embedded systems and small applications. It stores the entire database as
a single file, making it simple and efficient for local storage.
Source code:
#Admin Dashboard
from tkinter
import*
Page |
[Type
import os
Page | 5
23MCA1PCPY:Python
class ResultManagementSystem:
self.home=home
self.home.geometry("1350x700+0+0")
self.home.config(bg="white")
self.logo=ImageTk.PhotoImage(file="images/logo_p.png")
# self.logo=Image.open("images/logo.jpg")
# self.logo=self.logo.resize((90,35),Image.Resampling.LANCZOS)
# self.logo=ImageTk.PhotoImage(self.logo)
#Title of project
title=Label(self.home,text="Student Result
Management",padx=10,compound=LEFT,image=self.logo,font=("goudy oid
style",20,"bold"),bg="#033054",fg="white").place(x=0,y=0,relwidth=1,height=50)
# Menu
Frame.place(x=10,y=70,width=1250,height=80)
#SubMenu
button_Course=Button(Frame,text="Course",font=("goudy old
style",15,"bold"),bg="#0b5377",fg="white",cursor="hand2",command=self.add_course).place(x=20,y=
5,width=200,height=40)
button_Student=Button(Frame,text="Student",font=("goudy old
style",15,"bold"),bg="#0b5377",fg="white",cursor="hand2",command=self.add_student).place(x=240,
y=5,width=200,height=40)
Page |
[Type
button_Result=Button(Frame,text="Result",font=("goudy old
style",15,"bold"),bg="#0b5377",fg="white",cursor="hand2",command=self.add_result).place(x=460,y
=5,width=200,height=40)
button_Logout=Button(Frame,text="Logout",font=("goudy old
style",15,"bold"),bg="#0b5377",fg="white",cursor="hand2",command=self.logout).place(x=900,y=5,w
idth=200,height=40)
button_Exit=Button(Frame,text="Exit",font=("goudy old
style",15,"bold"),bg="#0b5377",fg="white",cursor="hand2",command=self.exit).place(x=1120,y=5,wid
th=150,height=40)
# Content Window
self.bgImage=Image.open("Images/6.3.jpg"
self.bgImage=self.bgImage.resize((870,350),Image.Resampling.LANCZOS)
self.bgImage=ImageTk.PhotoImage(self.bgImage)
self.lbl_bg=Label(self.home,image=self.bgImage).place(x=400,y=180,width=870,height=350)
# Update Details
self.totalCourse.place(x=400,y=530,width=300,height=80)
self.totalstudent.place(x=710,y=530,width=300,height=80)
Page | 7
23MCA1PCPY:Python
self.totalresults.place(x=1020,y=530,width=300,height=80)
#Footer
self.update_details()
def update_details(self):
conn=sqlite3.connect(database="ResultManagementSystem.db")
cur=conn.cursor()
try:
cr=cur.fetchall()
self.totalCourse.config(text=f"Total course\n[{str(len(cr))}]")
self.totalCourse.after(200,self.update_details)
cr=cur.fetchall()
self.totalstudent.config(text=f"Total students\n[{str(len(cr))}]")
cr=cur.fetchall()
self.totalresults.config(text=f"Total results\n[{str(len(cr))}]")
Page |
[Type
self.window1=Toplevel(self.home)
self.obj1=CourseClass(self.window1)
def add_student(self):
self.window1=Toplevel(self.home)
self.obj1=StudentClass(self.window1)
def add_result(self):
self.window1=Toplevel(self.home)
self.obj1=ResultClass(self.window1
def add_view(self):
self.window1=Toplevel(self.home
self.obj1=ViewClass(self.window1
home=Tk()
obj=ResultManagementSystem(home
) home.mainloop()
Page | 9
23MCA1PCPY:Python
#Course Module
from tkinter
import*
Page |
[Type
import sqlite3
class CourseClass:
self.home=home
self.home.geometry("1200x500+80+170")
self.home.config(bg="white")
self.home.focus_force()
#Title of Course
#Variables
self.var_course=StringVar()
self.var_duration=IntVar()
self.var_charges=IntVar()
#Categories of Courses
#Entry Fields
Page |
23MCA1PCPY:Python
self.courseName1.place(x=150,y=60,width=200)
duration1 = Entry(self.home,textvariable=self.var_duration,font=("times
new roman",15,"bold"),bg="lightyellow").place(x=150,y=100,width=200)
charges1 = Entry(self.home,textvariable=self.var_charges,font=("times
new roman",15,"bold"),bg="lightyellow").place(x=150,y=140,width=200)
roman",15,"bold"),bg="lightyellow")
self.description1.place(x=150,y=180,width=500,height=150)
# Buttons
self.add_btn=Button(self.home,text="Save",font=("times new
roman",15,"bold"),bg="blue",fg="white",cursor="hand2",command=self.add)
self.add_btn.place(x=150,y=400,width=120,height=50)
self.update_btn=Button(self.home,text="Update",font=("times new
roman",15,"bold"),bg="green",fg="white",cursor="hand2",command=self.update)
self.update_btn.place(x=290,y=400,width=120,height=50)
self.delete_btn=Button(self.home,text="Delete",font=("times new
roman",15,"bold"),bg="grey",fg="white",cursor="hand2",command=self.delete)
self.delete_btn.place(x=430,y=400,width=120,height=50)
self.clear_btn=Button(self.home,text="Clear",font=("times new
roman",15,"bold"),bg="orange",fg="white",cursor="hand2",command=self.clear)
self.clear_btn.place(x=570,y=400,width=120,height=50)
#Search Panel
self.var_search=StringVar()
search_courseName1 = Entry(self.home,textvariable=self.var_search,font=("times
new roman",15,"bold"),bg="lightyellow").place(x=870,y=60,width=150)
Page |
[Type
btn_search=Button(self.home,text="Search",font=("times new
roman",15,"bold"),bg="blue",fg="white",cursor="hand2",command=self.search).place(x=1100,y=60,w
idth=80,height=28)
#Content
self.C_Frame=Frame(self.home,bd=2,relief=RIDGE)
self.C_Frame.place(x=720,y=100,width=430,height=340)
#Table
#SCROLLBAR
scroly=Scrollbar(self.C_Frame,orient=VERTICAL)
scrolx=Scrollbar(self.C_Frame,orient=HORIZONTAL)
self.CourseTable=ttk.Treeview(self.C_Frame,columns=("cid","name","duration","charges","descriptio
n"),xscrollcommand=scrolx.set,yscrollcommand=scroly.set)
scrolx.pack(side=BOTTOM,fill=X)
scroly.pack(side=RIGHT,fill=Y)
scrolx.config(command=self.CourseTable.xview)
scroly.config(command=self.CourseTable.yview)
self.CourseTable.heading("cid",text="Course ID")
self.CourseTable.heading("name",text="Name")
self.CourseTable.heading("duration",text="Duration")
self.CourseTable.heading("charges",text="Charges")
self.CourseTable.heading("description",text="Description")
self.CourseTable["show"]="headings"
self.CourseTable.column("cid",width=100)
self.CourseTable.column("name",width=100)
Page |
23MCA1PCPY:Python
self.CourseTable.column("duration",width=100)
self.CourseTable.column("charges",width=100)
self.CourseTable.column("description",width=150)
self.CourseTable.pack(fill=BOTH,expand=1)
self.show() #It is help to show details in table the function is defined at the bottom
# database
def clear(self):
self.show()
self.var_course.set("")
self.var_duration.set("")
self.var_charges.set("")
self.var_search.set("")
self.description1.delete('1.0',END)
self.courseName1.config(state=NORMAL)
Page |
[Type
def delete(self):
conn=sqlite3.connect(database="ResultManagementSystem.db")
cur=conn.cursor()
try:
if self.var_course.get()=="":
else:
row=cur.fetchone()
if row==None:
else:
if p==True:
conn.commit()
def get_data(self,event):
self.courseName1.config(state="readonly")
self.courseName1
r=self.CourseTable.focus()
content=self.CourseTable.item(r)
row=content["values"]
Page |
23MCA1PCPY:Python
self.var_course.set(row[1])
self.var_duration.set(row[2])
self.var_charges.set(row[3])
self.description1.delete('1.0',END)
self.description1.insert(END,row[4])
conn=sqlite3.connect(database="ResultManagementSystem.db")
cur=conn.cursor()
try:
if self.var_course.get()=="":
required",parent=self.home) else:
(self.var_course.get(),)) row=cur.fetchone()
if row!=None:
Present",parent=self.home) else:
( self.var_course.get(),
self.var_duration.get(),
self.var_charges.get(),
self.description1.get("1.0",END
Page |
[Type
))
Page |
23MCA1PCPY:Python
conn.commit()
self.show()
#Updating Details
def update(self):
conn=sqlite3.connect(database="ResultManagementSystem.db")
cur=conn.cursor()
try:
if self.var_course.get()=="":
else:
row=cur.fetchone()
if row==None:
else:
self.var_duration.get(),
self.var_charges.get(),
self.description1.get("1.0",END),
self.var_course.get()
))
conn.commit()
self.show()
Page |
[Type
def show(self):
conn=sqlite3.connect(database="ResultManagementSystem.db")
cur=conn.cursor()
try:
cur.execute("Select * from
course") rows=cur.fetchall()
self.CourseTable.delete(*self.CourseTable.get_children()
self.CourseTable.insert('',END,values=row)
def search(self):
conn=sqlite3.connect(database="ResultManagementSystem.db")
cur=conn.cursor()
try:
%'") rows=cur.fetchall()
self.CourseTable.delete(*self.CourseTable.get_children()
self.CourseTable.insert('',END,values=row)
Page |
23MCA1PCPY:Python
home=Tk()
obj=CourseClass(home)
home.mainloop()
#Student Module
import sqlite3
class StudentClass:
self.home=home
self.home.geometry("1200x500+80+170")
self.home.config(bg="white")
self.home.focus_force()
#Title of Course
#Variables
self.var_roll=IntVar()
Page |
[Type
self.var_name=StringVar()
self.var_email=StringVar()
self.var_gender=StringVar()
self.var_dob=StringVar()
self.var_contact=IntVar()
self.var_course=StringVar()
self.var_adm_date=StringVar()
self.var_state=StringVar()
self.var_city=StringVar()
self.var_pin=IntVar()
name = Label(self.home,text="Name",font=("times
new roman",15,"bold"),bg="white").place(x=10,y=100)
email = Label(self.home,text="Email",font=("times
new roman",15,"bold"),bg="white").place(x=10,y=140)
gender = Label(self.home,text="Gender",font=("times
new roman",15,"bold"),bg="white").place(x=10,y=180)
state = Label(self.home,text="State",font=("times
new roman",15,"bold"),bg="white").place(x=10,y=220)
self.state1 = Entry(self.home,textvariable=self.var_state,font=("times
new roman",15,"bold"),bg="lightyellow")
self.state1.place(x=150,y=220,width=150)
city = Label(self.home,text="City",font=("times
new
roman",15,"bold"),bg="white").place(x=330,y=220)
Page |
23MCA1PCPY:Python
self.city1.place(x=380,y=220,width=110)
self.pin1.place(x=560,y=220,width=120)
self.rollno1.place(x=150,y=60,width=200)
self.gender1 =
ttk.Combobox(self.home,textvariable=self.var_gender,values=("Select","Male","Female","Other"),fon
t=("times new roman",15,"bold"),state="readonly",justify=CENTER)
self.gender1.place(x=150,y=180,width=200)
self.gender1.current(0)
#Address
Page |
[Type
self.address.place(x=150,y=260,width=540,height=100)
dob = Label(self.home,text="D.O.B",font=("times
new roman",15,"bold"),bg="white").place(x=360,y=60)
contact = Label(self.home,text="Contact",font=("times
new roman",15,"bold"),bg="white").place(x=360,y=100)
admission = Label(self.home,text="Admission",font=("times
new roman",15,"bold"),bg="white").place(x=360,y=140)
course = Label(self.home,text="Course",font=("times
new roman",15,"bold"),bg="white").place(x=360,y=180)
#Entry Fields 2
self.course_list=[]
list self.fetch_course()
self.dob1 = Entry(self.home,textvariable=self.var_dob,font=("times
new roman",15,"bold"),bg="lightyellow")
self.dob1.place(x=480,y=60,width=200)
contact1 = Entry(self.home,textvariable=self.var_contact,font=("times
new roman",15,"bold"),bg="lightyellow").place(x=480,y=100,width=200)
admission1 = Entry(self.home,textvariable=self.var_adm_date,font=("times
new roman",15,"bold"),bg="lightyellow").place(x=480,y=140,width=200)
self.course1 =
ttk.Combobox(self.home,textvariable=self.var_course,values=self.course_list,font=("times new
roman",15,"bold"),state="readonly",justify=CENTER)
Page |
23MCA1PCPY:Python
self.course1.place(x=480,y=180,width=200)
self.course1.set("Select")
# Buttons
self.add_btn=Button(self.home,text="Save",font=("times new
roman",15,"bold"),bg="blue",fg="white",cursor="hand2",command=self.add)
self.add_btn.place(x=150,y=400,width=120,height=50)
self.update_btn=Button(self.home,text="Update",font=("times new
roman",15,"bold"),bg="green",fg="white",cursor="hand2",command=self.update)
self.update_btn.place(x=290,y=400,width=120,height=50)
self.delete_btn=Button(self.home,text="Delete",font=("times new
roman",15,"bold"),bg="grey",fg="white",cursor="hand2",command=self.delete)
self.delete_btn.place(x=430,y=400,width=120,height=50)
self.clear_btn=Button(self.home,text="Clear",font=("times new
roman",15,"bold"),bg="orange",fg="white",cursor="hand2",command=self.clear)
self.clear_btn.place(x=570,y=400,width=120,height=50)
#Search Panel
self.var_search=StringVar()
btn_search=Button(self.home,text="Search",font=("times new
roman",15,"bold"),bg="blue",fg="white",cursor="hand2",command=self.search).place(x=1070,y=60,w
idth=100,height=30)
#Content
self.C_Frame=Frame(self.home,bd=2,relief=RIDGE)
self.C_Frame.place(x=720,y=100,width=470,height=360)
Page |
[Type
#Table
#SCROLL BAR
scroly=Scrollbar(self.C_Frame,orient=VERTICAL)
scrolx=Scrollbar(self.C_Frame,orient=HORIZONTAL)
self.CourseTable=ttk.Treeview(self.C_Frame,columns=("roll","name","email","gender","dob","contac
t
","admission","course","state","city","pin","address"),xscrollcommand=scrolx.set,yscrollcommand=scr
oly.set)
scrolx.pack(side=BOTTOM,fill=X)
scroly.pack(side=RIGHT,fill=Y)
scrolx.config(command=self.CourseTable.xview
scroly.config(command=self.CourseTable.yview
self.CourseTable.heading("roll",text="Roll No")
self.CourseTable.heading("name",text="Name")
self.CourseTable.heading("email",text="Email")
self.CourseTable.heading("gender",text="Gender")
self.CourseTable.heading("dob",text="D.O.B")
self.CourseTable.heading("contact",text="Contact")
self.CourseTable.heading("admission",text="Admission"
) self.CourseTable.heading("course",text="Course")
self.CourseTable.heading("state",text="State")
self.CourseTable.heading("city",text="City")
self.CourseTable.heading("pin",text="PIN")
Page |
23MCA1PCPY:Python
self.CourseTable.heading("address",text="Address")
Page |
[Type
self.CourseTable["show"]="headings"
self.CourseTable.column("roll",width=100)
self.CourseTable.column("name",width=100)
self.CourseTable.column("email",width=100)
self.CourseTable.column("gender",width=100)
self.CourseTable.column("dob",width=100)
self.CourseTable.column("contact",width=100)
self.CourseTable.column("admission",width=100)
self.CourseTable.column("course",width=100)
self.CourseTable.column("state",width=100)
self.CourseTable.column("city",width=100)
self.CourseTable.column("pin",width=100)
self.CourseTable.column("address",width=100)
self.CourseTable.pack(fill=BOTH,expand=1)
self.show() #It is help to show details in table the function is defined at the bottom
# database
def clear(self):
Page |
23MCA1PCPY:Python
self.var_roll.set("")
self.var_name.set("")
self.var_email.set("")
self.var_gender.set("Select")
self.var_dob.set("")
self.var_contact.set("")
self.var_adm_date.set("")
self.var_course.set("Select")
self.var_state.set("")
self.var_city.set("")
self.var_pin.set("")
self.address.delete("1.0",END)
self.rollno1.config(state=NORMAL)
self.var_search.set("")
def delete(self):
conn=sqlite3.connect(database="ResultManagementSystem.db")
cur=conn.cursor()
try:
if self.var_roll.get()=="" :
",parent=self.home) else:
(self.var_roll.get(),)) row=cur.fetchone()
if row==None:
Page |
[Type
else:
if p==True:
conn.commit()
def get_data(self,event):
self.rollno1.config(state="readonly")
self.rollno1
r=self.CourseTable.focus()
content=self.CourseTable.item(r)
row=content["values"]
self.var_roll.set(row[0])
self.var_name.set(row[1])
self.var_email.set(row[2])
self.var_gender.set(row[3])
self.var_dob.set(row[4])
self.var_contact.set(row[5])
self.var_adm_date.set(row[6])
self.var_course.set(row[7])
self.var_state.set(row[8])
self.var_city.set(row[9])
Page |
23MCA1PCPY:Python
self.var_pin.set(row[10])
self.address.delete("1.0",END)
self.address.insert(END,row[11]
conn=sqlite3.connect(database="ResultManagementSystem.db")
cur=conn.cursor()
try:
else:
row=cur.fetchone()
if row!=None:
Present",parent=self.home) else:
self.var_roll.get(),
self.var_name.get()
Page |
[Type
self.var_email.get()
self.var_gender.get(),
Page |
23MCA1PCPY:Python
self.var_dob.get(),
self.var_contact.get(),
self.var_adm_date.get(),
self.var_course.get(),
self.var_state.get(),
self.var_city.get(),
self.var_pin.get(),
self.address.get("1.0",END)
))
conn.commit()
self.show()
#Updating Details
def update(self):
conn=sqlite3.connect(database="ResultManagementSystem.db")
cur=conn.cursor()
try:
if self.var_roll.get()=="":
else:
row=cur.fetchone()
if row==None:
Page |
[Type
else:
self.var_name.get(),
self.var_email.get(),
self.var_gender.get(),
self.var_dob.get(),
self.var_contact.get(),
self.var_adm_date.get(),
self.var_course.get(),
self.var_state.get(),
self.var_city.get(),
self.var_pin.get(),
self.address.get("1.0",END)
, self.var_roll.get()
))
conn.commit()
messagebox.showinfo("Great","Student Update
Successfully",parent=self.home) self.show()
def show(self):
conn=sqlite3.connect(database="ResultManagementSystem.db")
cur=conn.cursor()
Page |
23MCA1PCPY:Python
try:
rows=cur.fetchall()
self.CourseTable.delete(*self.CourseTable.get_children())
self.CourseTable.insert('',END,values=row)
def fetch_course(self):
conn=sqlite3.connect(database="ResultManagementSystem.db")
cur=conn.cursor()
try:
rows=cur.fetchall()
if len(rows)>0:
self.course_list.append(row[0])
def search(self):
conn=sqlite3.connect(database="ResultManagementSystem.db")
cur=conn.cursor()
try:
Page |
[Type
row=cur.fetchone(
) if row !=None:
self.CourseTable.delete(*self.CourseTable.get_children())
self.CourseTable.insert('',END,values=row)
else:
messagebox.showerror("Error","No record
home=Tk()
obj=StudentClass(home)
home.mainloop()
class ResultClass:
self.home=home
System") self.home.geometry("1200x500+80+170")
self.home.config(bg="white")
Page |
23MCA1PCPY:Python
self.home.focus_force()
#Title of result
#Variables
self.var_roll=IntVar()
self.var_name=StringVar()
self.var_course=StringVar()
self.var_marks=IntVar()
self.var_full_marks=IntVar()
self.roll_list=[]
self.fetch_roll()
#Sections
Page |
[Type
self.student1 =
ttk.Combobox(self.home,textvariable=self.var_roll,values=self.roll_list,font=("times new
roman",15,"bold"),state="readonly",justify=CENTER)
self.student1.place(x=280,y=100,width=200)
self.student1.set("Select")
btn_search=Button(self.home,text="Search",font=("times new
roman",15,"bold"),bg="blue",fg="white",cursor="hand2",command=self.search).place(x=500,y=100,w
idth=100,height=28)
txt_marks = Entry(self.home,textvariable=self.var_marks,font=("times
new
roman",20,"bold"),bg="lightyellow").place(x=280,y=280,width=320,height=30)
txt_full_marks = Entry(self.home,textvariable=self.var_full_marks,font=("times
new roman",20,"bold"),bg="lightyellow").place(x=280,y=340,width=320,height=30)
#Buttons
self.add=Button(self.home,text="Submit",font=("times new
roman",15,"bold"),bg="lightblue",activebackground="lightblue",cursor="hand2",command=self.add)
self.add.place(x=300,y=420,width=120,height=35)
self.clear=Button(self.home,text="Clear",font=("times new
roman",15,"bold"),bg="lightgreen",activebackground="lightgreen",cursor="hand2",command=self.cle
ar).place(x=430,y=420,width=120,height=35)
#Image
self.bgImage=Image.open("Images/Result.png")
self.bgImage=self.bgImage.resize((530,300),Image.Resampling.LANCZOS)
Page |
23MCA1PCPY:Python
self.bgImage=ImageTk.PhotoImage(self.bgImage)
Page |
[Type
self.lbl_bg=Label(self.home,image=self.bgImage).place(x=640,y=100)
def fetch_roll(self):
conn=sqlite3.connect(database="ResultManagementSystem.db")
cur=conn.cursor()
try:
rows=cur.fetchall()
if len(rows)>0:
self.roll_list.append(row[0])
def search(self):
conn=sqlite3.connect(database="ResultManagementSystem.db")
cur=conn.cursor()
try:
row=cur.fetchone()
if row !=None:
self.var_name.set(row[0])
self.var_course.set(row[1])
else:
Page |
23MCA1PCPY:Python
messagebox.showerror("Error","No record
def add(self):
conn=sqlite3.connect(database="ResultManagementSystem.db")
cur=conn.cursor()
try:
if self.var_name.get()=="":
Record",parent=self.home) else:
row=cur.fetchone()
if row!=None:
Present",parent=self.home) else:
percentage=(int(self.var_marks.get())*100)/int(self.var_full_marks.get())
cur.execute("Insert into
result(roll,name,course,marks_obtain,full_marks,percentage) values(?,?,?,?,?,?)",(
self.var_roll.get(),
self.var_name.get(),
self.var_course.get(),
self.var_marks.get(),
self.var_full_marks.get()
, str(percentage)
Page |
[Type
))
conn.commit()
def clear(self):
self.var_roll.set("Select"),
self.var_name.set(""),
self.var_course.set(""),
self.var_marks.set(""),
self.var_full_marks.set("")
home=Tk()
obj=ResultClass(home)
home.mainloop()
#View Result
import sqlite3
class ViewClass:
Page |
23MCA1PCPY:Python
self.home=home
System") self.home.geometry("1200x500+80+170")
self.home.config(bg="white")
self.home.focus_force()
#Title of result
#Search
self.var_search=StringVar()
self.var_id=""
txt_select = Entry(self.home,textvariable=self.var_search,font=("times
new roman",20),bg="lightyellow").place(x=520,y=100,width=150)
btn_search=Button(self.home,text="Search",font=("times new
roman",15,"bold"),bg="lightblue",fg="black",cursor="hand2",command=self.search).place(x=680,y=10
0,width=100,height=35)
btn_clear=Button(self.home,text="Clear",font=("times new
roman",15,"bold"),bg="lightgreen",fg="black",cursor="hand2",command=self.clear).place(x=800,y=10
0,width=100,height=35)
Page |
[Type
self.roll.place(x=150,y=280,width=150,height=50)
self.name.place(x=300,y=280,width=150,height=50)
self.course.place(x=450,y=280,width=150,height=50)
self.marks.place(x=600,y=280,width=150,height=50)
self.full.place(x=750,y=280,width=150,height=50)
self.percentage.place(x=900,y=280,width=150,height=50)
#Delete button
btn_delete=Button(self.home,text="Delete",font=("times new
roman",15,"bold"),bg="red",fg="white",cursor="hand2",command=self.delete).place(x=500,y=350,wi
dth=150,height=35)
Page |
23MCA1PCPY:Python
def search(self):
conn=sqlite3.connect(database="ResultManagementSystem.db")
cur=conn.cursor()
try:
if self.var_search.get()=="":
required",parent=self.home) else:
(self.var_search.get(),)) row=cur.fetchone()
if row !=None:
self.var_id=row[0]
self.roll.config(text=row[1])
self.name.config(text=row[2])
self.course.config(text=row[3])
self.marks.config(text=row[4])
self.full.config(text=row[5])
self.percentage.config(text=row[6]
else:
def clear(self):
Page |
[Type
self.var_id="
"
Page |
23MCA1PCPY:Python
self.roll.config(text="")
self.name.config(text="")
self.course.config(text="")
self.marks.config(text="")
self.full.config(text="")
self.percentage.config(text="")
self.var_search.set("")
def delete(self):
conn=sqlite3.connect(database="ResultManagementSystem.db")
cur=conn.cursor()
try:
if self.var_id=="":
else:
row=cur.fetchone()
if row==None:
else:
if p==True:
conn.commit()
Page |
[Type
home=Tk()
obj=ViewClass(home)
home.mainloop()
#Database File
import sqlite3
def
create_db():
conn=sqlite3.connect(database="ResultManagementSystem.db")
cur=conn.cursor()
conn.commit()
conn.commit()
conn.commit()
# conn.close()
Page |
23MCA1PCPY:Python
create_db()
Output:
Page |
[Type
Page |
[Type
Searching course
Search by course name:
Page |
23MCA1PCPY:Python
Page |
[Type
Page |
23MCA1PCPY:Python
Page |
[Type
Page |
23MCA1PCPY:Python
Page |
[Type
Exit
Page |
23MCA1PCPY:Python
Teamwork Details:
Tejaswini N
Worked on both backend and frontend by adding styles to page, writing search exit add
functions for backend and also helped to prepare documents
Thanushree RN
Worked on both backend and frontend by adding table format display , updatecourse,
functions and also helped to prepared document
Vaishnavi
Worked on frontend and helped in preparing document. writing clear,add functions for
backend and also helped to prepare documents
6. Conclusion
The Student Result Management System project aims to streamline the process of managing student
results, thereby improving efficiency, accuracy, and transparency in educational institutions. By
leveraging Python's versatility and ecosystem of libraries, this project can be customized an extended
to meet the specific requirements of different educational organizations.
Page |
[Type
#Title of Course
title=Label(self.home,text="Manage Student Details",font=("times new
roman",20,"bold"),bg="#CC3366",fg="white").place(x=0,y=0,relwidth=1,height=40)
#Variables
self.var_roll=IntVar()
self.var_name=StringVar()
self.var_email=StringVar()
self.var_gender=StringVar()
self.var_dob=StringVar()
self.var_contact=IntVar()
self.var_course=StringVar()
self.var_adm_date=StringVar()
self.var_state=StringVar()
self.var_city=StringVar()
self.var_pin=IntVar()
ssttaatete==LLaabbeel(ls(seelfl..fh.hoommee,t,etexxt=t=""SSttaatete"",f,ofonnt=t=("("titmimeessnneewwrroommaann"",1,155,","bbooldld""
),)b,bgg==""wwhhitiete"").)p.plalaccee(x(x==1100,y,y==222200)) Page |
23MCA1PCPY:Python
self.state1.place(x=150,y=220,width=150)
#Address
self.address = Text(self.home,font=("times new roman",15,"bold"),bg="lightyellow")
self.address.place(x=150,y=260,width=540,height=100)
#Entry Fields 2
self.course_list=[] #Function
call to update list
self.fetch_course()
self.course1.set("Select")
# Buttons self.add_btn=Button(self.home,text="Save",font=("times
new
roman",15,"bold"),bg="blue",fg="white",cursor="hand2",command=self.add)
self.add_btn.place(x=150,y=400,width=120,height=50)
self.update_btn=Button(self.home,text="Update",font=("times new
roman",15,"bold"),bg="green",fg="white",cursor="hand2",command=self.update)
self.update_btn.place(x=290,y=400,width=120,height=50)
self.delete_btn=Button(self.home,text="Delete",font=("times new
roman",15,"bold"),bg="grey",fg="white",cursor="hand2",command=self.delete)
self.delete_btn.place(x=430,y=400,width=120,height=50)
self.clear_btn=Button(self.home,text="Clear",font=("times new
roman",15,"bold"),bg="orange",fg="white",cursor="hand2",command=self.clear)
self.clear_btn.place(x=570,y=400,width=120,height=50)
#Search Panel
self.var_search=StringVar()
search_rollno = Label(self.home,text="Search By Roll No. ",font=("times new
roman",15,"bold"),bg="white").place(x=720,y=60)
search_rollno1 = Entry(self.home,textvariable=self.var_search,font=("times new
roman",15,"bold"),bg="lightyellow").place(x=890,y=60,width=160,height=30) btn_search=Button(self.home,text="Search",font=("times
new roman",15,"bold"),bg="blue",fg="white",cursor="hand2",command=self.search).place(x=1070,y=60,width=100,height=30)
#Content self.C_Frame=Frame(self.home,bd=2,relief=RIDGE)
self.C_Frame.place(x=720,y=100,width=470,height=360)
#Table
#SCROLL
BAR
scroly=Scrollbar(self.C_Frame,orient=VERTICAL)
scrolx=Scrollbar(self.C_Frame,orient=HORIZONTAL)
self.CourseTable.heading("roll",text="Roll No")
self.CourseTable.heading("name",text="Name")
self.CourseTable.heading("email",text="Email")
self.CourseTable.heading("gender",text="Gender")
self.CourseTable.heading("dob",text="D.O.B")
self.CourseTable.heading("contact",text="Contact")
self.CourseTable.heading("admission",text="Admission") Page | 54
self.CourseTable.heading("course",text="Course")
self.CourseTable.heading("state",text="State")
self.CourseTable.heading("city",text="City")
self.CourseTable.heading("pin",text="PIN")
23MCA1PCPY:Python
self.CourseTable["show"]="headings"
self.CourseTable.column("roll",width=100)
self.CourseTable.column("name",width=100)
self.CourseTable.column("email",width=100)
self.CourseTable.column("gender",width=100)
self.CourseTable.column("dob",width=100)
self.CourseTable.column("contact",width=100)
self.CourseTable.column("admission",width=100)
self.CourseTable.column("course",width=100)
self.CourseTable.column("state",width=100)
self.CourseTable.column("city",width=100) self.CourseTable.column("pin",width=100)
self.CourseTable.column("address",width=100)
self.CourseTable.pack(fill=BOTH,expand=1)
self
self.CourseTable.bind("<ButtonRelease-1>",self.get_data) #When you click on any cid row it will show details on their sections
get_data function is defined below
self.show() #It is help to show details in table the function is defined at the bottom
# database
#Adding name,duration, discription and showing pop messages on pc accordint to that
def clear(self):
self.var_roll.set("")
self.var_name.set("")
self.var_email.set("")
self.var_gender.set("Select")
self.var_dob.set("")
self.var_contact.set("")
self.var_adm_date.set("")
self.var_course.set("Select")
self.var_state.set("")
self.var_city.set("")
self.var_pin.set("")
self.address.delete("1.0",END)
self.rollno1.config(state=NORMAL)
self.var_search.set("")
def get_data(self,event):
self.rollno1.config(state="readonly")
self.rollno1
r=self.CourseTable.focus()
content=self.CourseTable.item(r)
row=content["values"]
self.var_roll.set(row[0])
self.var_name.set(row[1])
self.var_email.set(row[2])
self.var_gender.set(row[3])
self.var_dob.set(row[4])
self.var_contact.set(row[5])
self.var_adm_date.set(row[6])
self.var_course.set(row[7])
self.var_state.set(row[8])
self.var_city.set(row[9])
self.var_pin.set(row[10])
self.address.delete("1.0",END)
self.address.insert(END,row[11])
Page5of8
23MCA1PCPY:Python
self.var_email.get(),
self.var_gender.get(),
self.var_dob.get(),
self.var_contact.get(),
self.var_adm_date.get(),
self.var_course.get(),
self.var_state.get(),
self.var_city.get(),
self.var_pin.get(),
self.address.get("1.0",END)
))
conn.commit()
messagebox.showinfo("Great","Student Added Successfully",parent=self.home) self.show()
conn=sqlite3.connect(database="ResultManagementSystem.db") cur=conn.cursor()
try:
cur.execute("Select * from student")
rows=cur.fetchall()
self.CourseTable.delete(*self.CourseTable.get_children())
for row in rows:
self.CourseTable.insert('',END,values=row)
def search(self):
conn=sqlite3.connect(database="ResultManagementSystem.db")
cur=conn.cursor()
try:
cur.execute("Select * from student where roll=?",(self.var_search.get(),))
For dashboard
and course:
Page | 58
23MCA1PCPY:Python
#Title of project
title=Label(self.home,text="Student Result Management",padx=10,compound=LEFT,image=self.logo,font=("goudy oid
style",20,"bold"),bg="#033054",fg="white").place(x=0,y=0,relwidth=1,height=50)
# Menu
Frame = LabelFrame(self.home,text="Menu",font=("times new roman",15,"bold"),bg="white")
Frame.place(x=10,y=70,width=1250,height=80)
#SubMenu
button_Course=Button(Frame,text="Course",font=("goudy old
Page | 59
style",15,"bold"),bg="#0b5377",fg="white",cursor="hand2",command=self.add_course).place(x=20,y=5,width=200,height=40
button_Student=Button(Frame,text="Student",font=("goudy old
style",15,"bold"),bg="#0b5377",fg="white",cursor="hand2",command=self.add_student).place(x=240,y=5,width=200,height=
[Type
style",15,"bold"),bg="#0b5377",fg="white",cursor="hand2",command=self.add_result).place(x=460,y=5,width=200,height=40
button_Logout=Button(Frame,text="Logout",font=("goudy old
style",15,"bold"),bg="#0b5377",fg="white",cursor="hand2",command=self.logout).place(x=900,y=5,width=200,height=40)
button_Exit=Button(Frame,text="Exit",font=("goudy old
style",15,"bold"),bg="#0b5377",fg="white",cursor="hand2",command=self.exit).place(x=1120,y=5,width=150,height=40)
self.lbl_bg=Label(self.home,image=self.bgImage).place(x=400,y=180,width=870,height=350)
# Update Details
self.totalCourse=Label(self.home,text="Total Courses \n 0 ",font=("times new
roman",20),bd=10,relief=RIDGE,bg="purple",fg="white")
self.totalCourse.place(x=400,y=530,width=300,height=80)
self.totalstudent=Label(self.home,text="Total Student \n 0 ",font=("times new
roman",20),bd=10,relief=RIDGE,bg="orange",fg="white")
self.totalstudent.place(x=710,y=530,width=300,height=80)
#Footer
footer=Label(self.home,text="student result management system \n contact mr if any issuses:8123XXX85",font=("times new
roman",12,"bold"),bg="#262626",fg="white").pack(side=BOTTOM,fill=X)
self.update_details()
def add_student(self):
self.window1=Toplevel(self.home)
self.obj1=StudentClass(self.window1)
def add_result(self):
self.window1=Toplevel(self.home)
self.obj1=ResultClass(self.window1)
def add_view(self):
self.window1=Toplevel(self.home)
self.obj1=ViewClass(self.window1)
if name
==" main ":
home=Tk()
obj=ResultManagementSystem(home)
home.mainloop()
#Title of Course
title=Label(self.home,text="Manage Course",font=("times new
roman",20,"bold"),bg="#CC3366",fg="white").place(x=0,y=0,relwidth=1,height=40)
#Variables
self.var_course=StringVar()
self.var_duration=IntVar()
self.var_charges=IntVar()
#Categories of Courses
P ag10e,y|=6610)
courseName = Label(self.home,text="Course Name",font=("times new roman",15,"bold"),bg="white").place( x=
duration = Label(self.home,text="Duration",font=("times new roman",15,"bold"),bg="white").place(x=10,y=100) charges =
Label(self.home,text="Charges",font=("times new roman",15,"bold"),bg="white").place(x=10,y=140) description =
Label(self.home,text="Description",font=("times new roman",15,"bold"),bg="white").place(x=10,y=180)
[Type
# Buttons self.add_btn=Button(self.home,text="Save",font=("times
new
roman",15,"bold"),bg="blue",fg="white",cursor="hand2",command=self.add)
self.add_btn.place(x=150,y=400,width=120,height=50)
self.update_btn=Button(self.home,text="Update",font=("times new
roman",15,"bold"),bg="green",fg="white",cursor="hand2",command=self.update)
self.update_btn.place(x=290,y=400,width=120,height=50)
self.delete_btn=Button(self.home,text="Delete",font=("times new
roman",15,"bold"),bg="grey",fg="white",cursor="hand2",command=self.delete)
self.delete_btn.place(x=430,y=400,width=120,height=50)
self.clear_btn=Button(self.home,text="Clear",font=("times new
roman",15,"bold"),bg="orange",fg="white",cursor="hand2",command=self.clear)
self.clear_btn.place(x=570,y=400,width=120,height=50)
#Search Panel
self.var_search=StringVar()
search_courseName = Label(self.home,text=" Course Name",font=("times new
roman",15,"bold"),bg="white").place(x=690,y=60)
search_courseName1 = Entry(self.home,textvariable=self.var_search,font=("times new
roman",15,"bold"),bg="lightyellow").place(x=870,y=60,width=150) btn_search=Button(self.home,text="Search",font=("times
new roman",15,"bold"),bg="blue",fg="white",cursor="hand2",command=self.search).place(x=1100,y=60,width=80,height=28)
#Content self.C_Frame=Frame(self.home,bd=2,relief=RIDGE)
self.C_Frame.place(x=720,y=100,width=430,height=340)
#Table
#SCROLLB
AR
scroly=Scrollbar(self.C_Frame,orient=VERTICAL)
scrolx=Scrollbar(self.C_Frame,orient=HORIZONTAL)
self.CourseTable.heading("description",text="Description")
self.CourseTable["show"]="headings"
self.CourseTable.column("cid",width=100)
self.CourseTable.column("name",width=100)
self.CourseTable.column("duration",width=100)
self.CourseTable.column("charges",width=100)
self.CourseTable.column("description",width=150)
self.CourseTable.pack(fill=BOTH,expand=1)
self.CourseTable.bind("<ButtonRelease-1>",self.get_data) #When you click on any cid row it will show details on their sections
get_data function is defined below
self.show() #It is help to show details in table the function is defined at the bottom
# database
#Adding name,duration, discription and showing pop messages on pc accordint to that
self.var_search.set("")
self.description1.delete('1.0',END)
self.courseName1.config(state=NORMAL)
def get_data(self,event):
[Type
self.courseName1
r=self.CourseTable.focus()
content=self.CourseTable.item(r)
row=content["values"]
self.var_course.set(row[1])
self.var_duration.set(row[2])
self.var_charges.set(row[3])
self.description1.delete('1.0',END)
self.description1.insert(END,row[4])
self.description1.get("1.0",END),
self.var_course.get()
))
conn.commit()
messagebox.showinfo("Great","Course Update Successfully",parent=self.home) self.show()
def show(self):
conn=sqlite3.connect(database="ResultManagementSystem.db")
cur=conn.cursor()
try:
cur.execute("Select * from course")
rows=cur.fetchall()
self.CourseTable.delete(*self.CourseTable.get_children())
for row in rows:
self.CourseTable.insert('',END,values=row)
def search(self):
conn=sqlite3.connect(database="ResultManagementSystem.db")
cur=conn.cursor()
try:
cur.execute(f"Select * from course where name LIKE '%{self.var_search.get()}%'")
rows=cur.fetchall()
self.CourseTable.delete(*self.CourseTable.get_children()) for
row in rows: self.CourseTable.insert('',END,values=row)
if name
==" main ":
home=Tk()
obj=CourseClass(home)
home.mainloop()
Page | 65
[Type
#Title of result
title=Label(self.home,text="Manage Student Results",font=("times new
roman",20,"bold"),bg="#CC3366",fg="white").place(x=0,y=0,relwidth=1,height=50)
#Variables
self.var_roll=IntVar()
self.var_name=StringVar()
self.var_course=StringVar()
self.var_marks=IntVar()
self.var_full_marks=IntVar()
self.roll_list=[]
# Function calling from fetch
self.fetch_roll()
#Sections
lbl_select = Label(self.home,text="Select Student",font=("times new roman",20,"bold"),bg="white").place(x=50,y=100)
lbl_name = Label(self.home,text="Name",font=("times new roman",20,"bold"),bg="white").place(x=50,y=160) lbl_course =
Label(self.home,text="Course",font=("times new roman",20,"bold"),bg="white").place(x=50,y=220) lbl_marks =
Label(self.home,text="Marks Obtained",font=("times new roman",20,"bold"),bg="white").place(x=50,y=280) lbl_full_marks =
Label(self.home,text="Full Marks",font=("times new roman",20,"bold"),bg="white").place(x=P5a0,gye=3|4606)
btn_search=Button(self.home,text="Search",font=("times new
roman",15,"bold"),bg="blue",fg="white",cursor="hand2",command=self.search).place(x=500,y=100,width=100,height=28)
#Buttons self.add=Button(self.home,text="Submit",font=("times
new
roman",15,"bold"),bg="lightblue",activebackground="lightblue",cursor="hand2",command=self.add)
self.add.place(x=300,y=420,width=120,height=35) from
PIL import Image,ImageTk
self.clear=Button(self.home,text="Clear",font=("times new
roman",15,"bold"),bg="lightgreen",activebackground="lightgreen",cursor="hand2",command=self.clear).place(x=430,y=420,
#Image self.bgImage=Image.open("Images/Result.png")
self.bgImage=self.bgImage.resize((530,300),Image.Resampling.LANCZOS)
self.bgImage=ImageTk.PhotoImage(self.bgImage)
self.lbl_bg=Label(self.home,image=self.bgImage).place(x=640,y=100)
def add(self):
conn=sqlite3.connect(database="ResultManagementSystem.db")
cur=conn.cursor()
try:
if self.var_name.get()=="":
messagebox.showerror("Error","Please First Search Student Record",parent=self.home) else:
cur.execute("Select * from result where roll=? and course=?",(self.var_roll.get(),self.var_course.get()))
row=cur.fetchone()
if row!=None:
messagebox.showerror("Error, Result already Present",parent=self.home) else:
percentage=(int(self.var_marks.get())*100)/int(self.var_full_marks.get())
cur.execute("Insert into result(roll,name,course,marks_obtain,full_marks,percentage) values(?,?,?,?,?,?)",(
self.var_roll.get(),
self.var_name.get(),
self.var_course.get(),
self.var_marks.get(),
self.var_full_marks.get(),
str(percentage)
))
conn.commit()
messagebox.showinfo("Great","Result Added Successfully",parent=self.home)
def clear(self):
self.var_roll.set("Select"),
self.var_name.set(""),
self.var_course.set(""),
self.var_marks.set(""),
self.var_full_marks.set("")
if name
==" main ":
home=Tk()
obj=ResultClass(home)
home.mainloop()
#View Result
from tkinter import*
from PIL import Image,ImageTk from
tkinter import ttk,messagebox import Page | 68
sqlite3
class ViewClass:
def init (self,home):
self.home=home
23MCA1PCPY:Python
self.home.geometry("1200x500+80+170")
self.home.config(bg="white")
self.home.focus_force()
#Title of result
title=Label(self.home,text="View Student Results",font=("times new
roman",20,"bold"),bg="purple",fg="white").place(x=0,y=0,relwidth=1,height=50)
#Search
self.var_search=StringVar()
self.var_id=""
btn_search=Button(self.home,text="Search",font=("times new
roman",15,"bold"),bg="lightblue",fg="black",cursor="hand2",command=self.search).place(x=680,y=100,width=100,height=3
btn_clear=Button(self.home,text="Clear",font=("times new
roman",15,"bold"),bg="lightgreen",fg="black",cursor="hand2",command=self.clear).place(x=800,y=100,width=100,height=35
#Delete button
Page | 69
btn_delete=Button(self.home,text="Delete",font=("times new
roman",15,"bold"),bg="red",fg="white",cursor="hand2",command=self.delete).place(x=500,y=350,width=150,height=35)
[Type
conn=sqlite3.connect(database="ResultManagementSystem.db") cur=conn.cursor()
try:
if self.var_search.get()=="":
messagebox.showerror("Error","Roll No. should be required",parent=self.home) else:
cur.execute("Select * from result where roll=?",(self.var_search.get(),)) row=cur.fetchone()
if row !=None:
self.var_id=row[0]
self.roll.config(text=row[1])
self.name.config(text=row[2])
self.course.config(text=row[3])
self.marks.config(text=row[4])
self.full.config(text=row[5])
self.percentage.config(text=row[6])
else:
messagebox.showerror("Error","No record Found",parent=self.home)
def clear(self):
self.var_id=""
self.roll.config(text="")
self.name.config(text="")
self.course.config(text="")
self.marks.config(text="")
self.full.config(text="")
self.percentage.config(text="")
self.var_search.set("")
def delete(self):
conn=sqlite3.connect(database="ResultManagementSystem.db") cur=conn.cursor()
try if name ==" main ":
:
if self.var_id=="": home=Tk()
messagebox.showerror("Error","search Student Result First",parent=self.home) else: obj=ViewClass(home) home.mainloop()
cur.execute("Select * from result where rid=?",(self.var_id,))
row=cur.fetchone()
if row==None:
messagebox.showerror("Error","Invalid Student Result",parent=self.home) else:
p=messagebox.askyesno("Confirm","Do you really want to delete",parent=self.home) if
p==True:
cur.execute("Delete from result where rid=? ",(self.var_id,)) conn.commit()
messagebox.showinfo("Delete","Result deleted Successfully",parent=self.home)
self.clear() #We are calling clear because we declare show in to that
Page | 70
except Exception as ex:
messagebox.showerror("Error",f"Error due to {str(ex)}")
23MCA1PCPY:Python
Page | 71
[Type
Page | 72