0% found this document useful (0 votes)
17 views40 pages

Documentation Final

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)
17 views40 pages

Documentation Final

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
You are on page 1/ 40

PYTHON PROJECT

TEST ANALYSER

SYSTEM

DONE BY:

K. DHARSHINI
INDEX
1. ABOUT PYTHON

2. ABOUT TKINTER

3. ABOUT PYTHON-MYSQL CONNECTIVITY

4. PROJECT DESCRIPTION

5. SOFTWARE SPECIFICATION

6. SOURCE CODE

7. SAMPLE OUTPUT

8. CONCLUSION

9. INSTALLATION PROCEDURE

10. BIBLIOGRAPHY

1
ABOUT PYTHON:
Python programming language was developed by Guido Van Rossum in February 1991. Python
is based on or influenced with two programming languages:

 ABC language, a teaching language created as a replacement of BASIC, and

 Modula-3

Python is an interpreted, object-oriented, high-level programming language with dynamic


semantics. Its high-level built in data structures, combined with dynamic typing and dynamic
binding; make it very attractive for Rapid Application Development, as well as for use as a
scripting or glue language to connect existing components together. Python's simple, easy to learn
syntax emphasizes readability and therefore reduces the cost of program maintenance. Python
supports modules and packages, which encourages program modularity and code reuse. The
Python interpreter and the extensive standard library are available in source or binary form without
charge for all major platforms, and can be freely distributed.

Often, programmers fall in love with Python because of the increased productivity it provides.
Since there is no compilation step, the edit-test-debug cycle is incredibly fast. Debugging Python
programs is easy: a bug or bad input will never cause a segmentation fault. Instead, when the
interpreter discovers an error, it raises an exception. When the program doesn't catch the exception,
the interpreter prints a stack trace. A source level debugger allows inspection of local and global
variables, evaluation of arbitrary expressions, setting breakpoints, stepping through the code a line
at a time, and so on. The debugger is written in Python itself, testifying to Python's introspective
power. On the other hand, often the quickest way to debug a program is to add a few print
statements to the source: the fast edit-test-debug cycle makes this simple approach very effective.

2
ABOUT MYSQL:
MySQL, the most popular Open-Source SQL database management system, is developed,
distributed, and supported by Oracle Corporation.

 MySQL is a database management system.

A database is a structured collection of data. It may be anything from a simple shopping list
to a picture gallery or the vast amounts of information in a corporate network. To add, access,
and process data stored in a computer database, you need a database management system such
as MySQL Server. Since computers are very good at handling large amounts of data, database
management systems play a central role in computing, as standalone utilities, or as parts of
other applications.

 MySQL databases are relational.

A relational database stores data in separate tables rather than putting all the data in one big
storeroom. The database structures are organized into physical files optimized for speed. The
logical model, with objects such as databases, tables, views, rows, and columns, offers a
flexible programming environment. You set up rules governing the relationships between
different data fields, such as one-to-one, one-to-many, unique, required or optional,
and “pointers” between different tables. The database enforces these rules, so that with a well-
designed database, your application never sees inconsistent, duplicate, orphan, out-of-date, or
missing data.

The SQL part of “MySQL” stands for “Structured Query Language”. SQL is the most
common standardized language used to access databases. Depending on your programming
environment, you might enter SQL directly (for example, to generate reports), embed SQL
statements into code written in another language, or use a language-specific API that hides
the SQL syntax.

SQL is defined by the ANSI/ISO SQL Standard. The SQL standard has been evolving since
1986 and several versions exist. In this manual, “SQL-92” refers to the standard released in
1992, “SQL-1999” refers to the standard released in 1999, and “SQL:2003” refers to the
current version of the standard. We use the phrase “the SQL standard” to mean the current
version of the SQL Standard at any time.

3
 MySQL software is Open Source.

Open Source means that it is possible for anyone to use and modify the software. Anybody
can download the MySQL software from the Internet and use it without paying anything. If
you wish, you may study the source code and change it to suit your needs. The MySQL
software uses the GPL (GNU General Public License), to define what you may and may not
do with the software in different situations. If you feel uncomfortable with the GPL or need
to embed MySQL code into a commercial application, you can buy a commercially licensed
version from us.

 The MySQL Database Server is very fast, reliable, scalable, and easy to use.

If that is what you are looking for, you should give it a try. MySQL Server can run comfortably
on a desktop or laptop, alongside your other applications, web servers, and so on, requiring
little or no attention. If you dedicate an entire machine to MySQL, you can adjust the settings
to take advantage of all the memory, CPU power, and I/O capacity available. MySQL can
also scale up to clusters of machines, networked together.

MySQL Server was originally developed to handle large databases much faster than existing
solutions and has been successfully used in highly demanding production environments for
several years. Although under constant development, MySQL Server today offers a rich and
useful set of functions. Its connectivity, speed, and security make MySQL Server highly suited
for accessing databases on the Internet.

 MySQL Server works in client/server or embedded systems.


The MySQL Database Software is a client/server system that consists of a multithreaded SQL
server that supports different back ends, several different client programs and libraries,
administrative tools, and a wide range of application programming interfaces (APIs).

We also provide MySQL Server as an embedded multithreaded library that you can link into
your application to get a smaller, faster, easier-to-manage standalone product.

 A large amount of contributed MySQL software is available.


MySQL Server has a practical set of features developed in close cooperation with our users.
It is very likely that your favorite application or language supports the MySQL Database
Server. The official way to pronounce “MySQL” is “My Ess Que Ell” (not “my sequel”), but
we do not mind if you pronounce it as “my sequel” or in some other localized way.

4
ABOUT TKINTER:
Tkinter is a python program binding to the Tk GUI toolkit. It is the standard Python interface to
the Tk GUI toolkit, and is Python’s de facto standard GUI.Tkinter is included with standard Linux,
Microsoft Windows and Mac OS X installs of Python.Tk is a, cross-platform widget toolkit that
provides a library of basic elements of GUI widgets for building a graphical user interface (GUI)
in many programming languages.

The name Tkinter comes from Tk interface. Tkinter was written by Steen Lumholt and Guido Van
Rossum, then later revised by Fredrik Lundh. Like Tcl, Tk support Unicode within the Basic
Multilingual Plane, but it has not yet been extended to handle the current extended
full Unicode (e.g., UTF-16 from UCS-2 that Tk supports).

Tk has the following characteristics:

Platform-independent: Like Tcl, Tk is interpreted. It has been ported to multiple platforms and
can easily run on all of them without modification.

Customizable: Almost all the features of a widget in Tk are customizable through options during
the creation of the widget or later on through the configure command.

Configurable: Many of the options can be stored in an option database, making it very easy to
parameterize the look of an application (such as the color scheme). This also means that storing
the application-specific options is only a matter of saving the option add commands and executing
them on loading the application.

5
FEATURES OF TK:
Tk provides various widgets. Basic widgets are embedded into toplevel widgets, which in turn are

usually hosted by the operating system in floating windows that can be moved around on the
screen.

Basic widgets

Language bindings
 A library written in one programming language may be used in another language
if bindings are written; Tk is integrated with the Tcl language. Various other languages
have bindings for Tk, a partial list of which is on the Tk website. Bindings exist for
additional languages which might not be listed, including Ada (called
TASH),Haskell (called HTk), Perl, Python (called Tkinter), Ruby, Rexx, and Common
Lisp.

 There are several ways to use Tk from Perl: the Tcl::Tk and Tkx Perl modules,both of
which use Tcl as a bridge to access Tk, and Perl/Tk, which provides native Perl access to
Tk structures. The Python binding uses Tcl as a bridge to Tk.

6
ABOUT PYTHON-MYSQL
CONNECTIVITY:
While designing real-life applications, certain situations arise pertaining to storing some important
and necessary information by the user. Usually, the data inputted by the user along with the
generated output are displayed but not stored, since all the program execution takes place inside
the RAM, which is a temporary memory, and as soon as we close the form, its contents (form input
and generated output) get erased. They can’t be retrieved since they are not getting saved on a hard
disk (or any secondary storage device). Thus, when the application is executed the second time, it
requires a new set of inputs from the user. This limitation can be overcome by sending the output
generated and saving the input fetched from the user in a database created at the back-end of the
application. The input is fetched from the user using Python Interface. This is termed as the Front
End Interface of the application.

7
Database (The Back-end)
While working with an application, it is required to save data permanently on some secondary
storage device, which is usually the hard disk, so that data can be stored on it for future reference,
modification, deletion and retrieval. An application usually stores a lot of data in the form of a
database which is not directly accessible to the user. This database is used by the application to
give suitable response to the user. This database is called Back-end Database.

In Class XI, we have learnt how to create databases, tables and how to perform query processing
on these tables using SQL commands like CREATE, UPDATE, ALTER, INSERT, DELETE,
SELECT and so on in various forms according to their specific syntax structures. We shall be
implementing all these DDL and DML commands of SQL through Python Interface.

WHY PYTHON
Python is a flexible, portable, easy to learn and modifiable language. So, we are integrating
MySQL with Python interface for executing any database applications. The various reasons to use
Python for programming database applications are:

 Programming in Python is arguably more efficient and faster as compared to other


languages.

 Python is famous for its portability.

 It is platform-independent.

 Python supports SQL cursors.

 In many programming languages, the application developer needs to take care of the open
and closed connections of the database to avoid further exceptions and errors. In Python,
these connections are taken care of.

 Python supports relational database systems.

 Python database APIs are compatible with various databases, so it is very easy to migrate

and port database application interfaces.

8
PROJECT DESCRIPTION:
Objective:
The objective of this project is to let the students apply the programming knowledge into a real-

world situation/problem and exposed the students how programming skills helps in developing a

good software.

1. Write programs utilizing modern software tools.

2. Apply object-oriented programming principles effectively when developing small to

medium sized projects.

3. Write effective procedural code to solve small to medium sized problems.

4. Students will demonstrate a breadth of knowledge in computer science, as exemplified in

the areas of systems, theory and software development.

5. Students will demonstrate ability to conduct research or applied Computer Science project,

requiring writing and presentation skills which exemplify scholarly style in computer

science.

Description:
The objective of Test Analyser System is to allow the administrator of a class to add the test details

of a student into a database. It will also facilitate keeping all the test records of students, such as

their roll number, name, class, grade, test scores,etc. It will also calculate the total marks of the

student and their grade. So, all the information about student’s performance will be available in a

few seconds.

Overall, the Test Analyser System makes the job easier for the administrator of any class.

9
MODULES:
The important modules used in the project are as follows:

 Login
 Menu page
 Insert
 Result
 Ranking

The MySQL table used for storing student details in this project is:

 TEST I
 TEST 2

SOFTWARE SPECIFICATION:
Operating System : Windows10
Platform : Python IDLE 3.8.6
Database : MySQL
Language : Python

Note: For Python-MySQL connectivity, following data have been used: -


Host- localhost, user-root, password-root, database – project_DHS

10
SOURCE CODE:
Login Page
from tkinter import *
import tkinter.messagebox as MessageBox
import mysql.connector as mysql
from PIL import ImageTk, Image

def check():
if e1.get()=="FCS" and e2.get()=="09876":
login.destroy()
import menu_page
else:
l1=Label(login, text="Login unsuccessful", font = ("simsun", 20, "bold"), bg= "RED")
l1.place(x=600, y=330)
login=Tk()
login.geometry("900x500")
login.configure()
login.title("TEST ANALYSER Login")
# Add the image file
bg=ImageTk.PhotoImage(file="LOGIN.png")
# Create a canvas
canvas = Canvas(login,width= 400, height= 200)
canvas.pack(fill= "both", expand=True)
# Display image
canvas.create_image(0, 0, image=bg, anchor="nw")
# Add a text in canvas
canvas.create_text(450,20,text="WELCOME TO FCS - TEST ANALYSER SYSTEM",
font=("Times New Roman", 24, "bold"))

11
l1=Label(login, text ="Enter User_Id", font=("Arial", 15, "bold"), bg= "Skyblue")
l1.place(x=50, y=150)
e1=Entry(login, width=10, font=(20))
e1.place(x=250, y=150)
l2=Label(login, text = "Enter Password", font=("Arial", 15, "bold"), bg = "Skyblue")
l2.place(x=50, y=250)
e2=Entry(login, width=10, font=(20), show="*")
e2.place(x=250, y=250)
b2=Button(login, text="Submit", font=("Arial", 15, "bold"), bg="green", command = check)
b2.place(x=200, y=330)
login.mainloop()

Menu Page
from tkinter import *

import tkinter.messagebox as MessageBox

import mysql.connector as mysql

from PIL import ImageTk, Image

def insert():

import insert

def view():

import results

def rank():

import ranking

def exit1():

root.destroy()

12
root = Tk()

root.geometry("1200x600")

root.configure(bg="skyblue")

root.title("TEST ANALYSER Menu page")

# Add the image file

bg = ImageTk.PhotoImage(file="bglogin1.png")

# Create a canvas

canvas = Canvas(root,width= 400, height= 300)

canvas.pack(fill= "both", expand=True)

# Display image

canvas.create_image(0, 0, image=bg, anchor="nw")

# Add a text in canvas

canvas.create_text(550,70,text="WELCOME TO FCS", font=("Times New Roman", 24))

sname = Label(root, text="FREEDOM CONCEPT TEST ANALYSER SYSTEM",


font=("bold",25), bg = "skyblue")

sname.place(x=200, y=0)

insert = Button(root, text="ADD Records", font=("italic", 20), bg = "White", command = insert)

insert.place(x=150, y=100)

view = Button(root, text="VIEW Records", font=("italic", 20), bg = "White", command = view)

view.place(x=150, y=200)

rank= Button(root, text="SCOREBOARD", font=("italic", 20), bg = "White", command = rank)

rank.place(x=150, y=300)

closeButton = Button(root, text = "EXIT",font=("italic", 20), bg = "White", command = exit1)

closeButton.place(x=150, y=500)

root.mainloop()

13
Inserting Records
from tkinter import *

import tkinter.messagebox as msgBox

import mysql.connector as connector

mydb=connector.connect(host="localhost", user="root", password="root")

curs=mydb.cursor()

curs.execute('use Project_DHS')

root = Tk()

root.geometry("500x500")

root.configure(bg="skyblue")

root.title("ADD TEST RECORDS")

def TT1():

import insert1

def TT2():

import insert2

new= Button(root, text="TEST 1", font=("italic", 20), bg = "White", command = TT1)

new.place(x=150, y=100)

existing= Button(root, text="TEST 2", font=("italic", 20), bg = "White", command = TT2)

existing.place(x=150, y=300)

root.mainloop()

#for test 1

from tkinter import *

14
import tkinter.messagebox as msgBox

import mysql.connector as connector

mydb=connector.connect(host="localhost", user="root", password="root")

curs=mydb.cursor()

curs.execute('create database if not exists Project_DHS')

curs.execute('use Project_DHS')

rt1=Tk()

rt1.geometry ('500x500')

def add():

a=e1.get()

b=int(e2.get())

c=e3.get()

d=int(e4.get())

e=int(e5.get())

f=int(e6.get())

g=int(e7.get())

h=int(e8.get())

m=int(d+e+f+g+h)

if m in range (475,501):

n='A'

elif m in range (425,475):

n='B'

elif m in range (375,425):

n='C'

elif m in range (300,375):

n='D'

15
elif m in range (200,300):

n='E'

else:

n='F'

curs.execute("create table if not exists test1i(class varchar(10),rollno int,name


varchar(30),English int, Tamil int, Science int, SocialScience int, Mathematics int, Grade
varchar(5))")

st1="insert into test1i values ('{}',{},'{}',{},{},{},{},{},{},'{}')".format(a,b,c,d,e,f,g,h,m,n)

curs.execute(st1)

mydb.commit()

rt1.destroy()

import exitscreen

l1=Label(rt1, text ="Enter Class", font=("Arial", 15, "bold"), bg= "Skyblue")

l1.place(x=50, y=50)

e1=Entry(rt1, width=10, font=(20))

e1.place(x=400, y=50)

l2=Label(rt1, text ="Enter Rollno", font=("Arial", 15, "bold"), bg= "Skyblue")

l2.place(x=50, y=100)

e2=Entry(rt1, width=10, font=(20))

e2.place(x=400, y=100)

l3=Label(rt1, text ="Enter Name", font=("Arial", 15, "bold"), bg= "Skyblue")

l3.place(x=50, y=150)

e3=Entry(rt1, width=10, font=(20))

e3.place(x=400, y=150)

l4=Label(rt1, text ="English mark", font=("Arial", 15, "bold"), bg= "Skyblue")

l4.place(x=50, y=200)

16
e4=Entry(rt1, width=10, font=(20))

e4.place(x=400, y=200)

l5=Label(rt1, text ="Tamil mark", font=("Arial", 15, "bold"), bg= "Skyblue")

l5.place(x=50, y=250)

e5=Entry(rt1, width=10, font=(20))

e5.place(x=400, y=250)

l6=Label(rt1, text ="Science mark", font=("Arial", 15, "bold"), bg= "Skyblue")

l6.place(x=50, y=300)

e6=Entry(rt1, width=10, font=(20))

e6.place(x=400, y=300)

l7=Label(rt1, text = "SocialScience mark", font=("Arial", 15, "bold"), bg= "Skyblue")

l7.place(x=50, y=350)

e7=Entry(rt1, width=10, font=(20))

e7.place(x=400, y=350)

l8=Label(rt1, text ="Mathematics mark", font=("Arial", 15, "bold"), bg= "Skyblue")

l8.place(x=50, y=400)

e8=Entry(rt1, width=10, font=(20))

e8.place(x=400, y=400)

b=Button(rt1, text="Submit", font=("Arial", 15, "bold"), bg="white", command = add)

b.place(x=300, y=600)

rt1.mainloop()

17
Test 2
from tkinter import *

import tkinter.messagebox as msgBox

import mysql.connector as connector

mydb=connector.connect(host="localhost", user="root", password="root")

curs=mydb.cursor()

curs.execute('create database if not exists Project_DHS')

curs.execute('use Project_DHS')

rt1=Tk()

rt1.geometry ('500x500')

def add():

a=e1.get()

b=int(e2.get())

c=e3.get()

d=int(e4.get())

e=int(e5.get())

f=int(e6.get())

g=int(e7.get())

h=int(e8.get())

m=int(d+e+f+g+h)

if m in range (475,501):

n='A'

elif m in range (425,475):

n='B'

elif m in range (375,425):

n='C'

18
elif m in range (300,375):

n='D'

elif m in range (200,300):

n='E'

else:

n='F'

curs.execute("create table if not exists test2i(class varchar(10),rollno int,name


varchar(30),English int, Tamil int, Science int, SocialScience int, Mathematics int, Grade
varchar(5))")

st1="insert into test2i values ('{}',{},'{}',{},{},{},{},{},{},'{}')".format(a,b,c,d,e,f,g,h,m,n)

curs.execute(st1)

mydb.commit()

rt1.destroy()

import exitscreen

l1=Label(rt1, text ="Enter Class", font=("Arial", 15, "bold"), bg= "Skyblue")

l1.place(x=50, y=50)

e1=Entry(rt1, width=10, font=(20))

e1.place(x=400, y=50)

l2=Label(rt1, text ="Enter Rollno", font=("Arial", 15, "bold"), bg= "Skyblue")

l2.place(x=50, y=100)

e2=Entry(rt1, width=10, font=(20))

e2.place(x=400, y=100)

l3=Label(rt1, text ="Enter Name", font=("Arial", 15, "bold"), bg= "Skyblue")

l3.place(x=50, y=150)

e3=Entry(rt1, width=10, font=(20))

19
e3.place(x=400, y=150)

l4=Label(rt1, text ="English mark", font=("Arial", 15, "bold"), bg= "Skyblue")

l4.place(x=50, y=200)

e4=Entry(rt1, width=10, font=(20))

e4.place(x=400, y=200)

l5=Label(rt1, text ="Tamil mark", font=("Arial", 15, "bold"), bg= "Skyblue")

l5.place(x=50, y=250)

e5=Entry(rt1, width=10, font=(20))

e5.place(x=400, y=250)

l6=Label(rt1, text ="Science mark", font=("Arial", 15, "bold"), bg= "Skyblue")

l6.place(x=50, y=300)

e6=Entry(rt1, width=10, font=(20))

e6.place(x=400, y=300)

l7=Label(rt1, text = "SocialScience mark", font=("Arial", 15, "bold"), bg= "Skyblue")

l7.place(x=50, y=350)

e7=Entry(rt1, width=10, font=(20))

e7.place(x=400, y=350)

l8=Label(rt1, text ="Mathematics mark", font=("Arial", 15, "bold"), bg= "Skyblue")

l8.place(x=50, y=400)

e8=Entry(rt1, width=10, font=(20))

e8.place(x=400, y=400)

b=Button(rt1, text="Submit", font=("Arial", 15, "bold"), bg="white", command = add)

b.place(x=300, y=600)

rt1.mainloop()

20
Ranking (Scoreboard) Module
import mysql.connector as connector

import tkinter as tk

from tkinter import *

rooti= tk.Tk()

rooti.geometry("800x800")

mydb=connector.connect(host="localhost", user="root", password="root")

curs=mydb.cursor()

curs.execute('use Project_DHS')

rooti.configure(bg='skyblue')

rooti.title('SCOREBARD')

def scorei():

rooti.destroy()

import scoretesti

def score2():

rooti.destroy()

import scoretest2

test1 = Button(rooti, text="TEST 1", font=("italic", 20), bg = "White", command = scorei)

test1.place(x=150, y=200)

test2 = Button(rooti, text="TEST 2", font=("italic", 20), bg = "White", command = score2)

test2.place(x=150, y=500)

rooti.mainloop()

21
#Ranking for test 1
import mysql.connector as connector

import tkinter as tk

from tkinter import *

my_w = tk.Tk()

my_w.geometry("800x800")

mydb=connector.connect(host="localhost", user="root", password="root")

curs=mydb.cursor()

curs.execute('use Project_DHS')

curs.execute("create table if not exists test1i(class varchar(10),rollno int,name


varchar(30),English int, Tamil int, Science int, SocialScience int, Mathematics int, Grade
varchar(5))")

curs.execute ('select * from test1i order by Total desc')

e=Label(my_w,width=10,text='class',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=0)

e=Label(my_w,width=10,text='Rollno',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=1)

e=Label(my_w,width=10,text='Name',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=2)

e=Label(my_w,width=10,text='English',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=3)

e=Label(my_w,width=10,text='Tamil',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=4)

e=Label(my_w,width=10,text='Science',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=5)

e=Label(my_w,width=10,text='SocialScience',borderwidth=2,
relief='ridge',anchor='w',bg='yellow')

22
e.grid(row=0,column=6)

e=Label(my_w,width=10,text='Mathematics',borderwidth=2,
relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=7)

e=Label(my_w,width=10,text='TotalMarks',borderwidth=2,
relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=8)

e=Label(my_w,width=10,text='Grade',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=9)

i=1

for student in curs:

for j in range(len(student)):

e=Entry(my_w, width=10, fg='blue')

e.grid(row=i, column=j)

e.insert(END, student[j])

i=i+1

def erg():

my_w.destroy()

import exitscreen

closeButton = Button(my_w, text = "EXIT",font=("italic", 20), bg = "White", command = erg)

closeButton.place(x=400, y=500)

my_w.mainloop()

#Ranking for Test 2

import mysql.connector as connector

import tkinter as tk

23
from tkinter import *

my_w = tk.Tk()

my_w.geometry("800x800")

mydb=connector.connect(host="localhost", user="root", password="root")

curs=mydb.cursor()

curs.execute('use Project_DHS')

curs.execute("create table if not exists test2i(class varchar(10),rollno int,name


varchar(30),English int, Tamil int, Science int, SocialScience int, Mathematics int, Grade
varchar(5))")

curs.execute ('select * from test2i order by Total desc')

e=Label(my_w,width=10,text='class',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=0)

e=Label(my_w,width=10,text='Rollno',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=1)

e=Label(my_w,width=10,text='Name',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=2)

e=Label(my_w,width=10,text='English',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=3)

e=Label(my_w,width=10,text='Tamil',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=4)

e=Label(my_w,width=10,text='Science',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=5)

e=Label(my_w,width=10,text='SocialScience',borderwidth=2,
relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=6)

e=Label(my_w,width=10,text='Mathematics',borderwidth=2,
relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=7)

24
e=Label(my_w,width=10,text='TotalMarks',borderwidth=2,
relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=8)

e=Label(my_w,width=10,text='Grade',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=9)

i=1

for student in curs:

for j in range(len(student)):

e=Entry(my_w, width=10, fg='blue')

e.grid(row=i, column=j)

e.insert(END, student[j])

i=i+1

def erg():

my_w.destroy()

import exitscreen

closeButton = Button(my_w, text = "EXIT",font=("italic", 20), bg = "White", command = erg)

closeButton.place(x=400, y=500)

my_w.mainloop()

25
View Results Module:
import mysql.connector as connector

import tkinter as tk

from tkinter import *

my_w = tk.Tk()

my_w.geometry("800x800")

mydb=connector.connect(host="localhost", user="root", password="root")

curs=mydb.cursor()

curs.execute('use Project_DHS')

my_w.configure(bg='pink')

def FT():

my_w.destroy()

import test1rec

def ST():

my_w.destroy()

import test2rec

test1 = Button(my_w, text="TEST 1", font=("italic", 20), bg = "White", command = FT)

test1.place(x=150, y=200)

test2 = Button(my_w, text="TEST 2", font=("italic", 20), bg = "White", command = ST)

test2.place(x=150, y=500)

my_w.mainloop()

26
Results of Test 1
import mysql.connector as connector

import tkinter as tk

from PIL import ImageTk, Image

from tkinter import *

mydb=connector.connect(host="localhost", user="root", password="root")

curs=mydb.cursor()

curs.execute("use Project_DHS")

w=Tk()

w.geometry('800x700')

w.configure(bg='skyblue')

w.title('TEST 1 records')

curs.execute ('select * from test1i')

e=Label(w,width=10,text='class',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=0)

e=Label(w,width=10,text='Rollno',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=1)

e=Label(w,width=10,text='Name',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=2)

e=Label(w,width=10,text='English',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=3)

e=Label(w,width=10,text='Tamil',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=4)

e=Label(w,width=10,text='Science',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=5)

e=Label(w,width=10,text='SocialScience',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

27
e.grid(row=0,column=6)

e=Label(w,width=10,text='Mathematics',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=7)

e=Label(w,width=10,text='ToatalMarks',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=8)

e=Label(w,width=10,text='Grade',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=9)

i=1

for student in curs:

for j in range(len(student)):

e=Entry(w, width=10, fg='blue')

e.grid(row=i, column=j)

e.insert(END, student[j])

i=i+1

def erg():

w.destroy()

import exitscreen

closeButton = Button(w, text = "EXIT",font=("italic", 20), bg = "White", command = erg)

closeButton.place(x=400, y=500)

w.mainloop()

28
Results of Test 2
import mysql.connector as connector

import tkinter as tk

from PIL import ImageTk, Image

from tkinter import *

mydb=connector.connect(host="localhost", user="root", password="root")

curs=mydb.cursor()

curs.execute("use Project_DHS")

w=Tk()

w.geometry('800x700')

w.configure(bg='skyblue')

w.title('TEST 2 records')

curs.execute ('select * from test2i')

e=Label(w,width=10,text='class',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=0)

e=Label(w,width=10,text='Rollno',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=1)

e=Label(w,width=10,text='Name',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=2)

e=Label(w,width=10,text='English',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=3)

e=Label(w,width=10,text='Tamil',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=4)

e=Label(w,width=10,text='Science',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=5)

29
e=Label(w,width=10,text='SocialScience',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=6)

e=Label(w,width=10,text='Mathematics',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=7)

e=Label(w,width=10,text='ToatalMarks',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=8)

e=Label(w,width=10,text='Grade',borderwidth=2, relief='ridge',anchor='w',bg='yellow')

e.grid(row=0,column=9)

i=1

for student in curs:

for j in range(len(student)):

e=Entry(w, width=10, fg='blue')

e.grid(row=i, column=j)

e.insert(END, student[j])

i=i+1

def erg():

w.destroy()

import exitscreen

closeButton = Button(w, text = "EXIT",font=("italic", 20), bg = "White", command = erg)

closeButton.place(x=400, y=500)

w.mainloop()

30
Exit Module
from tkinter import *

import tkinter.messagebox as MessageBox

import mysql.connector as mysql

from PIL import ImageTk, Image

thank=Tk()

thank.geometry("900x500")

thank.configure()

thank.title(" FREEDOM CONCEPT SCHOOL - TEST ANALYSER SYSTEM")

canvas= Canvas(thank, width= 800, height= 200, bg="yellow")

canvas.create_text(400, 50, text="THANK YOU FOR USING FCS - TEST ANALYSER


SYSTEM", fill="black", font=('Helvetica 15 bold'))

canvas.pack()

thank.mainloop()

exit

31
SAMPLE OUTPUT:
LOGIN PAGE:

MAIN MENU:

32
INSERTING TEST RECORDS:

33
VIEW RESULTS:

34
SCOREBOARD (SCORES FROM HIGHEST TO
LOWEST):

35
EXIT PAGE:

36
CONCLUSION:
Test Analyser System stands as a pivotal tool in modern educational landscapes, fostering a

Data-driven approach to student success. Through its comprehensive features, user-friendly

interface and functionalities, this system empowers administrator, teachers and students alike to

engage in the academic to access and analyse academic performance data with ease.

The implementation of this project provides a platform to effectively display and manage student

results. The main aim of the program is to make the work easier and faster in school. This project

is much closer to teacher as well as student. This project is very easy to store the marks of the

students. This software can be used even by an ordinary person.

37
INSTALLATION PROCEDURE:
Install Python and MySQL from the web
Open the source code
Then run the login_page.pyfile
Work on the software

38
BIBLIOGRAPHY:
1. Computer science With Python - Class XII By : SumitaArora

2. Computer science With Python - Class XII By : Preeti Arora

3. Website: https://www.tutorialsteacher.com

4. Website: https://www.javatpoint.com

5. Website: https://www.w3resource.com

39

You might also like