You are on page 1of 32

AJAY KUMAR GARG ENGINEERING COLLEGE

27th KM STONE, DELHI-HAPUR BYPASS ROAD, P.O.


ADHYATMIK NAGAR, GHAZIABAD-201009

AN
INDUSTRIAL TRAINING REPORT
ON
STUDENT INFORMATION SYSTEM

AT
CETPA INFOTECH PRIVATE LIMITED
ROORKEE

Submitted By :- Under the Guidance of :-


Name : Akshit Jain Mr. Anmol
Year: IV
Semester : VII
Section : CS-1
Branch : CSE
Date : 10/11/2019
AJAY KUMAR GARG ENGINEERING COLLEGE
27th KM STONE, DELHI-HAPUR BYPASS ROAD,P.O. ADHYATMIK
NAGAR,GHAZIABAD-201009

TRAINING CERTIFICATE

This is to certify that Akshit Jain, student of AJAY KUMAR GARG

ENGINEERING COLLEGE, B.Tech Final year, Computer Science

Engineering branch, has undergone Industrial Training in Python

with Machine Learning in Cetpa Infotech Private Limited from 12

June 2019 to17 July 2019.

Gp. Capt. P.K. Chopra VSM (Retd.)


HoD (CSE) Prof. & HoD (T&P)
TRAINING CERTIFICATE
ACKNOWLEDGEMENT

I, Akshit Jain, would like to place on record my deep sense of


gratitude to Mr. Anmol, Cetpa, for his generous guidance, help
and useful suggestions. I am very grateful that he gives me an
opportunity to work with him as a PythonProgrammer. I am
extremely thankful to “CETPA” for providing me infrastructural
facilities to work in, without which this work would not have
been possible.

Akshit Jain
COMPANY PROFILE

Cetpa contributes a lot to the knowledge of its trainees and we try


our level hard to contribute the best to increase our trainee’s
ability so that they stand out from others and whatever they
contribute to the corporate world automatically becomes
productive. Not only the fresher but also the corporates who are
not able to deal with the rising technology and software are also
helped here. We try our level best to deliver our services to every
corner of the world by the help of customized education.

Our motto is to deliver the best services to you and that is why we
have taken the customized approach because we do not want you
to compromise with your education.
INDEX

1. Python

2. Graphical User Interface (GUI)


2.1 Introduction
2.2 Designing Graphical User Interface

3. Tkinter
3.1 Introduction
3.2 What is Tkinter ?
3.3 Why Tkinter ?

4. Tkinter Widgets
4.1 Introduction
4.2 Types of widgets
4.3 Event-Driven Processing
4.4 Geometry Managers

5. Project
5.1 Introduction
5.2 Useof SQLite databaseinsystem.
5.3 Source Codes and Screens

6. Conclusion

7. References
1. Python

Python is an interpreted, interactive, object-oriented high-level


language. Its syntax resembles pseudo-code, especially because of
the fact that indentation is used to indentify blocks. Python is a
dynamcally typed language, and does not require variables to be
declared before they are used. Variables “appear” when they are
first used and “disappear” when they are no longer needed.

Python is a scripting language like Tcl and Perl. Because of its


interpreted nature, it is also often compared to Java. Unlike Java,
Python does not require all instructions to reside inside classes.

Python is also a multi-platform language, since the Python


interpreter is available for a large number of standard operating
systems, including MacOS, UNIX, and Microsoft Windows.
Python interpreters are usually written in C, and thus can be
ported to almost any platform which has a C compiler.
2. Graphical User Interfaces(GUI)

Introduction:
Setting up a GUI application is similar to how an artist produces a
painting. Conventionally, there is a single canvas onto which the
artist must put all the work. Here’s how it works: you start with a
clean slate, a “top-level” windowing object on which you build
the rest of your components.

Think of it as a foundation to a house or the easel for an artist. In


other words, you have to pour the concrete or set up your easel
before putting together the actual structure or canvas on top of it.
In Tkinter, this foundation is known as the top-level window
object.

Designing Graphical User Interface :


Graphical User Interfaces (GUIs) are what allows end users to
interact with an application. An application can be excellent, but
without a good user interface, it becomes more difficult to use,
and less enjoyable. It is thus very important to design good user
interfaces.

Designing user interface takes place at two different levels: the


graphical level and the event level. Graphical elements of a user
interface are called widgets. Widgets are basic components like
buttons, scrollbars, etc. But user interfaces involve more than a
collection of widgets placed in a window. The application must
be able to respond to mouse clicks, keyboard actions or system
events such as minimizing the window. For this to happen, events
must be associated to some pieces of code. This process is called
binding. The next two chapters will cover each level in more
details, but this chapter will present an overview of Tkinter and
explain why it has become the leading GUI toolkit for the Python
language.
3. Tkinter

Introduction:
The Tkinter module (“Tk interface”) is the standard Python
interfaceto the Tk GUI toolkit from Scriptics(formerly developed
by Sun Labs). Both Tk and Tkinter are available on most Unix
platforms, as well as on Windows and Macintosh systems.
Starting with the 8.0 release, Tk offers native look and feel on all
platforms.

Tkinter consists of a number of modules. The Tk interface is


located in a binary module named _tkinter (this was tkinter in
earlier versions). This module contains the low-level interface to
Tk, and should never be used directly by application
programmers. It is usually a shared library (or DLL), but might in
some cases be statically linked with the Python interpreter.

In addition to the Tk interface module, Tkinter includes a number


of Python modules. The two most important modules are the
Tkinter module itself, and a module called Tkconstants. The
former automatically imports the latter, so to use Tkinter, all you
need to do is to import one module:
import Tkinter
Or, more often:
from Tkinter import *
What is Tkinter?

Tkinter is an open source, portable graphical user interface (GUI)


library designed for use in Python scripts. Tkinter relies on the Tk
library, the GUI library used by Tcl/Tk and Perl, which is in turn
implemented in C. Thus, Tkinter is implemented using multiple
layers.
Several competing GUI toolkits are available to use with the
Python language, namely:
wxPython : a wrapper extension for wxWindows, a portable GUI
library originally developed for the C++ language. It is the second
most popular GUI toolkit for Python since it is considered
excellent for complex interface design.

JPython (Jython) : since it is implemented in java, JPython has


access to Java GUI libraries, namely SWING and AWT.
Recently, JTkinter has been implemented and provides a Tkinter
port to JPython using the Java Native Interface (JNI).

PyKDE / PyQt, PyGTK : these packages provide an access to


KDE and Gnome GUI libraries to python scripts.

Win32all.exe : provides access to Microsoft Foundation Classes


(MFC) to python scripts. It is limited to run on MS Windows
only.

WPY : a GUI library that can be used on both Microsoft


Windows and UNIX X Windows. This library uses the MFC
coding style.

X11 : a library based on the X Windows and Motif libraries


allowing excellent control of the X11 environment, but are
limited to run on X Windows OS’s only
Why Tkinter?

With all the competing GUI toolkits available for the Python
language, what makes Tkinter stand out of the rest? Why is it the
most popular toolkit for use interface design?
To find the answer, one must look at the advantages that it offers:
1. Layered design: The layered approach used in designing
Tkinter gives Tkinter all of the advantages of the TK library.
Therefore, at the time of creation, Tkinter inherited from the
benefits of a GUI toolkit that had been given time to mature.
This makes early versions of Tkinter a lot more stable and
reliable than if it had been rewritten from scratch. Moreover,
the conversion from Tcl/Tk to Tkinter is really trivial, so that
Tk programmers can learn to use Tkinter very easily
.
2. Accessibility: LearningTkinter is very intuitive, and therefore
quick and painless. The Tkinter implementation hides the
detailed and complicated calls in simple, intuitive methods.
This is a continuation of the Python way of thinking, since the
language excels at quickly building prototypes. It is therefore
expected that its preferred GUI library be implemented using
the same approach.

3. Portability: Python scripts that use Tkinter do not require


modifications to be ported from one platform to the other.
Tkinter is available for any platform that Python is
implemented for, namely Microsoft Windows, X Windows,
and Macintosh. This gives it a great advantage over most
competing libraries, which are often restricted to one or two
platforms. Moreover, Tkinter will provide the native look-
and-feel of the specific platform it runs on.

4. Availability: Tkinter is now included in any Python


distribution. Therefore, no supplementary modules are
required in order to run scripts using Tkinter.
4. Tkinter Widgets

Introduction:
A software widget is a relatively simple and easy-to-use software
application or component made for one or more different software
platforms.
A widget is therefore a graphical object that is available from the
Tkinter library. It is a kind of graphical building block.
Intuitively, widgets are implemented as classes in Tkinter. Each
widget therefore has a constructor, a destructor, its own set of
properties and methods, and so on. While most other GUI toolkits
have a very complex widget hierarchy, Tkinter’s hierarchy is
extremely simple.

Types Of widgets:

1. Toplevel:
The Toplevel is technically not a widget, although this is
more or less transparent to the user.

2. Button:
The Button widget is a rectangular widget that is able to
display text. This text can occupy several lines (if the text
itself contains newlines or if wrapping occurs). Moreover,
this text can have an underlined character (usually indicating
a keyboard shortcut). Buttons are usually used to execute an
action when they are clicked, so they offer the command
option which associates a callback with the event
corresponding to a mouse click with the left mouse button
on the widget.
3. Checkbutton :
The Checkbutton displays some text (or image) along with a
small square called indicator. The indicator is drawn
differently depending on the state of the checkbutton
(selected or not).

4. Entry:
The Entry widget allows users to type and edit a single line
of text. A portion of this text can be selected.

5. Frame:
The Frame widget is a rectangular container for other
widgets. It is primarily used as a gemometry master since it
allows to group widgets. It can have an unvisible border
which is useful to space widgets. It can also have a visible
border with a 3D effect, or no border at all. The Frame
widget does not provide any methods except the standard
Widget methods.

6. Label:
The Label widget is used to display text. It can only display
text in a single font at a time. The text can span more than
one line. In addition, one character in the text can be
underlined, usually indicating a keyboard shortcut. The
Label widget does not provide any methods except the
standard Widget methods.

7. Listbox:
The Listbox widget displays a list of strings. Each string is
displayed on a separate line. It allows to insert, modify or
delete strings from the list. The listbox can only contain text
items, and all items must have the same font and colour.
Depending on the widget configuration, the user can choose
one or more alternatives from the list.

8. Menu:
The Menu widget is used to implement toplevel, pulldown,
and popup menus.

9. Message:
The Message widget is used to display multiple lines of
text. It is very similar to a plain label, but can adjust its
width to maintain a given aspect ratio. The Label widget
does not provide any methods except the standard Widget
methods.

10. OptionMenu:
OptionMenu inherits from Menubutton. It is used to display
a drop-down list of options. It only defines a constructor of
the form: OptionMenu(master, variable, value, *values)
where master is the master widget of this OptionMenu,
variable is a Tkinter, value and *values are the values
displayed by the OptionMenu. The documentation states that
value will be the default variable, but it is not the case. The
only point in having a separate value argument is to ensure
that at least one value is to be displayed. To set the default
value (or any value at any point of the execution), use
variable.set(value).

11. Radiobutton:
The Radiobutton widget used to implement one-of-many
selections. Radiobuttons can contain text or images, and you
can associate a callback with each button to be excuted
when the button is pressed. Each group of Radiobutton
widgets should be associated with a single variable. Each
button then represents a single value for that variable.

12. Scale:
The Scale widget is used to display a slider which allows
the user to select a value within a specified range.
13. Scrollbar:
The Scrollbar widget is a typical scrollbar, with arrows at
both ends and a slider portion in the middle. Unlike typical
scrollbars, its color can be modified.

14. Text

Event-Driven Processing:

Usually, widgets have some associated behaviors, such as when a


button is pressed, or text is filled into a text field. These types of
user behaviors are called events, and the GUI’s response to such
events are known as callbacks.

Events can include the actual button press (and release), mouse
movement, hitting the Return or Enter key, etc. The entire system
of events that occurs from the beginning until the end of a GUI
application is what drives it. This is known as event-driven
processing.

One example of an event with a callback is a simple mouse move.


Suppose that the mouse pointer is sitting somewhere on top of
your GUI application. If you move the mouse to another part of
your application, something has to cause the movement of the
mouse to be replicated by the cursor on your screen so that it
looks as if it is moving according to the motion of your hand.
These are mouse move events that the system must process
portray your cursor moving across the window. When you release
the mouse, there are no more events to process, so everything just
remains idle on the screen again.

The event-driven processing nature of GUIs fits right in with


client/server architecture.

• When you start a GUI application, it must perform some setup


procedures to prepare for the core execution, just as how a
network server must allocate a socket and bind it to a local
address.

• The GUI application must establish all the GUI components,


then draw (a.k.a. render or paint) them to the screen. This is the
responsibility of the geometry manager (more about this in a
moment). When the geometry manager has completed arranging
all of the widgets, including the top-level window, GUI
applications enter their server-like infinite loop.

• This loop runs forever waiting for GUI events, processing them,
and then going to wait for more events to process.

Geometry Managers:
Tk has three geometry managers that help with positioning your
widgetset:

• Placer: You provide the size of the widgets and locations to


place them; the manager then places them for you. The problem is
that you have to do this with all the widgets, burdening the
developer with coding that should otherwise take place
automatically.

• Packer: it packs widgets into the correct places (namely the


containing parent widgets, based on your instruction), and for
every succeeding widget, it looks for any remaining “real estate”
into which to pack the next one. The process is similar to how
you would pack elements into a suitcase when traveling.

• Grid: It is used to specify GUI widget placement, based on grid


coordinates. The Grid will render each object in the GUI in their
grid position.
5. PROJECT

STUDENT INFORMATION SYSTEM

Introduction:

The project is about the student information management


system for university & colleges.
Student Information Management System is managed by an
administrator. It is the job of the administrator to insert, update
and monitor the whole process.
This project helps in maintaining the database of the students
in any educational organization. The authorized user can easily
access and update any student’s information anytime and can
be kept safely for long time without any damage.

Toolkit Used:

• Python Programming Language.


• GUI using Tkinter in Python.

USE OF SQLite DATABASE IN APP

SQLite:

Saving data to a database is ideal for repeating or structured


data, such as contact information. This page assumes that you
are familiar with SQL databases in general and helps you get
started with SQLite databases on Android. The APIs you'll
need to use a database on Android are available in the
android.database.sqlite package.
Create a database:

The SQLiteOpenHelper class contains a useful set of APIs for


managing your database. When you use this class to obtain
references to your database, the system performs the
potentially long-running operations of creating and updating
the database only when needed and not during app startup. All
you need to do is call getWritableDatabase() or
getReadableDatabase().

Insert into Database:

The first argument for insert() is simply the table name. The
second argument tells the framework what to do in the event
that the ContentValues is empty (i.e., you did not put any
values). If you specify the name of a column, the framework
inserts a row and sets the value of that column to null. If you
specify null, like in this code sample, the framework does not
insert a row when there are no values.
The insert() methods returns the ID for the newly created row,
or it will return -1 if there was an error inserting the data. This
can happen if you have conflict with pre-existing data in the
database.

Read information from database:

To read from a database, use the query() method, passing it


your selection criteria and desired columns. The method
combines elements of insert() and update(), except the column
list defines the data you want to fetch (the "projection"), rather
than the data to insert. The results of the query are returned to
you in a Cursor object.

Delete information from database:


To delete rows from a table, you need to provide selection
criteria that identify the rows to the delete() method. The
mechanism works the same as the selection arguments to the
query() method. It divides the selection specification into a
selection clause and selection arguments. The clause defines
the columns to look at, and also allows you to combine column
tests. The arguments are values to test against that are bound
into the clause. Because the result isn't handled the same as a
regular SQL statement, it is immune to SQL injection.

Update a database:
When you need to modify a subset of your database values, use
the update() method . Updating the table combines the
ContentValues syntax of insert() with the WHERE syntax of
delete().

Source Codes and Screens

Code for login page :


The system starts with login page where the registered admin
can enter user name and password to be able to access the
system.

from tkinter import*


from tkinter import messagebox
import dashboard
import dbase
mainscreen=Tk()
mainscreen.geometry("366x268+500+250")
mainscreen.title("Login Form")
mainscreen.config(bg='yellow')
uname=StringVar()
upass=StringVar()
def close():
exit()
def login():
if uname.get()=="" or upass.get()=="":
messagebox.showwarning("Warning","User name or password can't be blank !")
else:
u=uname.get()
p=upass.get()
dbase.cur.execute("select *from admin where email='" + u + "' and password='"+ p +"'")
try:
if len(dbase.cur.fetchone())>0:
dashboard.createDashboard()
except:
messagebox.showerror("Error","Wrong Username or Password !")

lbl1=Label(mainscreen,text="User name", font='Arial 12 bold', bg='yellow',fg='red')


lbl2=Label(mainscreen,text="Password", font='Arial 12 bold', bg='yellow',fg='red')
txt1=Entry(mainscreen,bd=2, width=40,textvariable=uname)
txt2=Entry(mainscreen,bd=2, width=40,textvariable=upass,show='*')
btn=Button(mainscreen,text='Login',bg="green",fg="white",font='Arial 12
bold',activebackground='blue',command=login)
btn2=Button(mainscreen,text='Close',bg="Blue",fg="white",font='Arial 12
bold',activebackground='blue',command=close)
lbl1.place(x=10,y=10)
lbl2.place(x=10,y=50)
txt1.place(x=100,y=10)
txt2.place(x=100,y=50)
btn.place(x=100,y=90)
btn2.place(x=170,y=90)

Code for dashboard :


After successful login ,the homepage that appears on the
screen is dashboard. Here, we have 5 buttons for 5 tasks with
multiple subtasks.
def createDashboard():
def close():
exit()
dashboard=Tk()
dashboard.geometry("366x268+500+250")
dashboard.title("Dashboard")
dashboard.config(bg='light green')
regbtn=Button(dashboard,text='Make a Registration',bg='Red', fg='White',font='Arial
12 bold',command=reg.registrationForm)
regbtn.pack(fill=X,pady=5,padx=5)
crsbtn=Button(dashboard,text='Add New Course',bg='Red', fg='White',font='Arial 12
bold',command=course.courseForm)
crsbtn.pack(fill=X,pady=5,padx=5)
rptbtn=Button(dashboard,text='Create Report',bg='Red',
fg='White',font='Arial 12 bold',command=close)
exitbtn.pack(fill=X,pady=5,padx=5)
dashboard.mainloop()

Code for Registration window:


Registration window consist of different types of entry
textbox for new registration details. There are two buttons at
the bottom. One saves the new entry. Other provides a view to
the whole record uptil now.
def viewDetail(sid):
def deleteRecord():
dbs.cur.execute("delete from registration where id='"+ str(sid) +"'")
dbs.db.commit()
messagebox.showinfo("Success","Record has been updated!")
updateform.destroy()

def updateRecord():
if n.get()=='' or f.get()=='' or d.get()=='' or c.get()=='' or e.get()=='' or a.get()=='':
messagebox.showwarning("Warning","All fields are mendatory!")
else:
cid=1
for cr in courses:
if crs.get()==cr:
break
cid+=1
dbs.cur.execute("update registration set name='"+ n.get() +"', father='"+ f.get()+"',
dob='" + d.get() + "', \
contact='"+ c.get() +"', email='"+ e.get() +"', address='"+ a.get() +"', courseid='"+
str(cid) +"' where id='"+ str(sid) +"'")
dbs.db.commit()
messagebox.showinfo("Success","Record has been updated!")
updateform.destroy()

dbs.cur.execute("select *from registration where id='"+ str(sid) +"'")


data=dbs.cur.fetchone()
updateform=Tk()
updateform.geometry("366x568+500+100")
updateform.title("Registration Detail")
updateform.config(bg='light green')
updateform.mainloop()

def allstudents():
dbs.cur.execute("select registration.id, registration.name, registration.father,
registration.dob, registration.contact, \
registration.email, registration.address, courses.course, courses.duration, courses.fee from
registration inner join courses on \
registration.courseid=courses.id")
return dbs.cur.fetchall()
def viewRegisteration():
regView=Tk()
regView.geometry("970x710+400+200")
regView.title("All Registration")
regView.config(bg='light green')
getStudents=allstudents()
def myfunction(event):
datacanvas.configure(scrollregion=datacanvas.bbox("all"),width=950,height=600)
dataframe=Frame(regView,bd=1, relief=GROOVE,width=300, height=100)
dataframe.place(x=0,y=0)
datacanvas=Canvas(dataframe)
subframe=Frame(datacanvas)
vscrollbar=Scrollbar(dataframe,orient="vertical",command=datacanvas.yview)
hscrollbar=Scrollbar(dataframe,orient="horizontal",command=datacanvas.xview)
r=1
for row in getStudents:
c=0
sid=row[0]
for column in row:
rclabel=Label(subframe,text=column,anchor=W, font='arial 11')
rclabel.grid(row=r,column=c,sticky=W, padx=2,pady=2)
c+=1
btn=Button(subframe,text='View',font='arial 11 bold',command=partial(viewDetail,sid)
)
btn.grid(row=r,column=c,padx=2,pady=2)
r+=1

def registrationForm():
def makeregistration():
regform=Tk()
regform.geometry("366x568+500+100")
regform.title("Registration")
regform.config(bg='light green')
lbl1=Label(regform,text='Name',bg='light green', font='arial 12 bold')
txt1=Entry(regform,bd=2)
lbl1.grid(row=0,column=0,sticky='W', padx=5,pady=5)
txt1.grid(row=0,column=1,sticky='W', padx=5,pady=5)
lbl2=Label(regform,text="Father's Name",bg='light green', font='arial 12 bold')
txt2=Entry(regform,bd=2)
lbl2.grid(row=1,column=0,sticky='W', padx=5,pady=5)
txt2.grid(row=1,column=1,sticky='W', padx=5,pady=5)
crs=StringVar(regform)
crs.set(courses[0])
corslist=OptionMenu(regform, crs, *courses)
lbl7.grid(row=6,column=0,sticky='W', padx=5,pady=5)
corslist.grid(row=6,column=1,sticky='W', padx=5,pady=5)

regbtn=Button(regform,text='Save', font='Arial 12 bold',bg='light


blue',command=makeregistration)
viewbtn=Button(regform,text='View', font='Arial 12 bold',bg='light
pink',command=viewRegisteration)
regbtn.grid(row=7,column=1,sticky=W)
viewbtn.grid(row=7,column=1,sticky=E)

regform.mainloop()

#registrationForm()

Code for Add course:


In case, there is a need to add a new course,we use this feature
of the system to add the new course.
def courseForm():
couform=Tk()
couform.geometry("366x268+500+250")
couform.title("Add Course")
couform.config(bg='light green')
menubar=Menu(couform)
menubar.add_cascade(label='Course Master', menu=coursemenu)
coursemenu.add_command(label='View Courses',command=displayCourses)
coursemenu.add_command(label='Exit',command=couform.destroy)
def addCourse():
c=crs.get()
d=dr.get()
f=fe.get()
dbs.cur.execute("insert into courses(course, duration, fee) values('"+ c +"','"+ d +"','" + f
+ "')")
dbs.db.commit()
messagebox.showinfo("Success","Course add successfully")
crs.set("")
dr.set("")
fe.set("")

crs=StringVar(couform)
dr=StringVar(couform)
fe=StringVar(couform)
coubtn=Button(couform,text='Add Course',font='arial 12 bold', command=addCourse)
coubtn.grid(row=5,column=1)
couform.mainloop()

Code for Backup Report:


A backup report file is generated using this feature. The format of
the file is.xls. This is done in order to secure the records.
import registration
import datetime
from tkinter import messagebox
def createBackup():
getdata=registration.allstudents()
fname='backup_'+ str(datetime.datetime.today().strftime("%b-%d-%Y-%H-%M-
%S"))+'.xls'
fobj=open(fname,'w')
headers="Student's Name\tFather's
Name\tD.O.B.\tContact\tEmail\tAddress\tCourse\tWeek\tFee\n";
fobj.write(headers)
for val in getdata:

data=val[1]+"\t"+val[2]+"\t"+val[3]+"\t"+val[4]+"\t"+val[5]+"\t"+val[6]+"\t"+val[7]+"\t"+va
l[8]+"\t"+ str(val[9])+"\n"
fobj.write(data)
fobj.close()
Code for DBase:
This is the code that deals with the management of the database
for the system. The database used here is sqlite 3.
import sqlite3
db=sqlite3.connect('sis.db')
cur=db.cursor()
cur.execute("create table if not exists admin(id integer primary key autoincrement, name
char(20), email char(50), password char(50))")
cur.execute("create table if not exists registration(id integer primary key autoincrement, name
char(20), father char(20), dob char(20),\
contact char(15), email char(50), address char(100), courseid int, regdate date)")
cur.execute("create table if not exists courses(id integer primary key autoincrement, course
char(50), duration char(20), fee int)")
db.commit()
cur.execute("insert into admin(name, email, password) values('Akshit','adminAkshit','1234')")
db.commit()

Code for Graph Report :


This feature gives a graphical representation of the data in order
to analyze it in more optimal way. A bar graph is shown here with
the dimensions as courses v/s no. of students.
import matplotlib.pyplot as plt
import dbase as dbs
def createGraph():
dbs.cur.execute("select count(registration.id), courses.course from registration inner join
courses\
on registration.courseid=courses.id group by courses.course")
data=dbs.cur.fetchall()
xdata=[]
ydata=[]
for val in data:
xdata.append(val[1])
ydata.append(val[0])
plt.bar(xdata,ydata,label='Registrations',color='r')
plt.legend()
plt.xlabel("Courses")
plt.ylabel("No of students")
plt.title("Students Registration Report")
plt.show()
Conclusion

• Helpful to perform paperless work and manage all data.


• Provide easy,accurate, unambiguous and faster data access.
• Manage student’s information during admission.
• Manage available courses in college.
• Overcome existing problems occurring in student
management.
• Reduce unnecessary paper work in maintaining student’s
information.
References

 https://docs.python.org/2/library/tkinter.html
 https://www.geeksforgeeks.org/python-gui-tkinter/
 http://msdl.cs.mcgill.ca/presentations/02.02.Tkinter/python-
intro
 https://pythonistaplanet.com/tkinter/
 https://pythontextbok.readthedocs.io/en/1.0/Introduction_to_
GUI_Programming.html
 https://dzone.com/articles/python-gui-examples-tkinter-
tutorial-like-geeks
 https://cseducators.stackexchange.com/questions/5358/any-
simple-python-gui-projects-for-beginner-novice-
programming-students

You might also like