cs ip
cs ip
GUDUVANCHERY
COMPUTER SCIENCE
Done by:
KISHORE.J
XII-B2
BONAFIDE CERTIFICATE
Date: ……………………..
1
INDEX
ADVANTAGES OF PROJECT
OUTPUT SCREEN
BIBLIOGRAPHY
2
INTRODUCTION
This is a project based on the Student Module System. The program
helps as an efficient platform designed to manage and track student
academic progress. It allows students to view grades, and monitor
their learning pathways. It includes various function programs to
do the above- mentioned tasks.
DBMS:
• Relation model
• Hierarchical model
• Network model
CHARACTERISTICS OF DBMS:
• Data sharing
• Data standardization
BASED ON ACCESS: -
• Sequential file
• Serial file
• Random (direct access) file
BASED ON STORAGE:
• Text file
• Binary File
4
NEED OF COMPUTERIZATION
6
SOFTWARE & HARDWARE
REQUIREMENTS
Software Specification:
Operating System: Windows 7
Platform: Python IDLE 3.7
Database: MySQL
Language: Python
Hardware Specification:
7
ADVANTAGES OF PROJECT
A Student Management System (SMS) provides a
comprehensive solution for managing student-related data
and processes in educational institutions. By automating
and streamlining various tasks, an SMS enhances
operational efficiency, improves data accuracy, and creates
a seamless experience for both educators and students.
Below are the key advantages of implementing a Student
Management System:
8
2. Time and Cost Savings
3. Enhanced Communication
10
7. Streamlined Reporting and Compliance
12
LIMITATIONS OF A STUDENT
MANAGEMENT SYSTEM (SMS)
13
INTRODUCTION
PYTHON:
Python is a high-level, interpreted scripting language
developed in the late 1980s by Guido van Rossum at the National
Research Institute for Mathematics and Computer Science in the
Netherlands. The initial version was published at the alt.sources
newsgroup in 1991, and version was released in 1994.
Python 2.0 was released in 2000, and the 2.x versions were
the prevalent releases until December 2008. At that time, the
development team made the decision to release version 3.0, which
contained a few relatively small but significant changes that were
not backward compatible with the 2.x versions. Python 2 and 3 are
very similar, and some features of Python 3 have been back ported
to Python 2. But in general, they remain not quite compatible.
Both Python 2 and 3 have continued to be maintained and
developed, with periodic release updates for both. As of this writing,
the most recent versions available are 2.7.15 and 3.6.5. However,
an official End of life of January 1,2020 has been established for
Python 2, after which time it will no longer be maintained. If you
are a newcomer to Python, it is recommended that you focus on
Python 3, as this tutorial will do.
Python is still maintained by a core development team at the
Institute, and Guido is still in charge, having been given the title of
BDFL (Benevolent Dictator For Life) by the Python community. The
name Python, by the way, derives not from the snake, but from the
British comedy troupe Monty Python’s Flying Circus, of which
Guido was, and presumably still is, a fan. It is common to find
references to Monty Python sketches and movies scattered
throughout the Python documentation.
14
Python is Popular
Python has been growing in popularity over the last few years.
The 2018 Stack Overflow Developer Survey ranked Python as the
7th most popular and the number one most wanted technology of
the year. World-class software development countries around the
globe use Python every single day. According to research by Dice
Python is also one of the hottest skills to have and the most popular
programming language in the world based on the Popularity of
programming Language Index.
Python is Interpreted
Many languages are compiled, meaning the source code you
create needs to be translated into machine code, the language of
your computer’s processor, before it can be run. Programs written
in an interpreted language are passed straight to an interpreter
that runs them directly. This makes for a quicker development
cycle because you just type in your code and run it, without the
intermediate compilation step.
One potential downside to interpreted languages is execution
speed. Programs that are compiled into the native language of the
computer processor tend to run more quickly than interpreted
programs. For some applications that are particularly
computationally intensive, like graphics processing or intense
number crunching, this can be limiting.
In practice, however, for most programs, the difference in
execution speed is measured in milliseconds, or seconds at most,
and not appreciably noticeable to a human user. The expediency of
coding in an interpreted language is typically worth it for most
applications.
15
Python is Free
The Python interpreter is developed under an OSI-approved
open-source license, making it free to install, use, and distribute,
even for commercial purposes.
A version of the interpreter is available for virtually any
platform there is, including all flavors of Unix, Windows, mac OS,
smartphones and tablets, and probably anything else you ever
heard of. A version even exists for the half dozen people remaining
who use OS/2.
Python is Portable
Because Python code is interpreted and not compiled into native
machine instructions, code written for one platform will work on
any other platform that has the Python interpreter installed. (This
is true of any interpreted language, not just Python.)
16
Python is Simple
As programming languages go, Python is relatively uncluttered,
and the developers have deliberately kept it that way.
A rough estimate of the complexity of a language can be gleaned
from the number of keywords or reserved words in the language.
These are words that are reserved for special meaning by the
compiler or interpreter because they designate specific built-in
functionality of the language.
Python 3 has 33 keywords, and Python 2 has 31. By contrast, C++
has 62, Java has 53, and Visual Basic has more than 120, though
these latter examples probably vary somewhat by implementation
or dialect.
MYSQL:
Database Management System & Types of DBMS:
A Database Management System (DBMS) is a software
application that interacts with the user, applications and the
database itself to capture and analyze data. The data stored in the
database can be modified, retrieved and deleted, and can be of any
type like strings, numbers, images etc.
Types of DBMS:
There are mainly 4 types of DBMS, which are Hierarchical,
Relational, Network, and Object-Oriented DBMS.
Hierarchical DBMS: As the name suggests, this type of DBMS has a
style of predecessor- successor type of relationship. So, it has a
structure similar to that of a tree, wherein the nodes represent
records and the branches of the tree represent fields.
17
Relational DBMS (RDBMS): This type of DBMS, uses a structure that
allows the users to identify and access data in relation to another
piece of data in the database.
Network DBMS: This type of DBMS supports many to many
relations wherein multiple member records can be linked.
Object-oriented DBMS: This type of DBMS uses small individual
software called objects. Each object contains a piece of data, and the
instructions for the actions to be done with the data.
Structured Query Language (SQL)
SQL is the core of a relational database which is used for accessing
and managing the database. By using SQL, you can add, update or
delete rows of data, retrieve subsets of information, modify
databases and perform many actions. The different subsets of SQL
are as follows:
18
MySQL & its Features
MySQL is an open-source relational database management system
that works on many platforms. It provides multi-user access to
support many storage engines and is backed by Oracle. So, you can
buy a commercial license version from Oracle to get premium
support services.
The features of MySQL are as follows:
Ease of Management –The software very easily gets downloaded
and also uses an event scheduler to schedule the tasks
automatically.
19
Scalability & Flexibility –With MySQL you can run deeply
embedded applications and create data warehouses holding
a humongous amount of data.
MySQL Data Types
20
Python MySQL Database Connection:
Arguments required to connect MySQL from Python
You need to know the following detail of the MySQL server to
perform the connection from Python.
21
DATABASE CONNECTIVITY:
Steps to connect MySQL database in Python using MySQL
Connector Python
1. Install MySQL Connector Python using pip.
2. Use the mysql.connector.connect()method of MySQL
Connector Python with required parameters to connect MySQL.
3. Use the connection object returned by a connect()method to
create a cursor object to perform Database Operations.
4. The cursor.execute()to execute SQL queries from Python.
5. Close the Cursor object using a cursor.close() and MySQL
database connection using connection.close() after your work
completes.
6. Catch Exception if any that may occur during this process.
22
SOURCE CODE OF PROJECT (PYTHON
CODE)
import sys
import matplotlib.pyplot as plt
import mysql.connector
mycon=mysql.connector.connect(host='localhost',user='root',
password='Jaisakthi',database='exam')
mycur=mycon.cursor()
def Student_Profile():
sql="Insert into
student(adm_no,name,class,section)values(%s,%s,%s,%s)"
print('\nPLEASE PROVIDE THE REQUIRED INFORMATION\n')
ad=input('\nENTER THE ADMISSION NUMBER TO REGISTER FOR
EXAM:')
nm=input('\nENTER THE STUDENT NAME:')
cls=int(input('\nENTER THE CLASS(11/12):'))
sec=input('\nENTER THE SECTION(A-D):')
value=(ad,nm,cls,sec)
try:
mycur.execute(sql,value)
print(nm,'ADDED SUCCESSFULLY TO EXAM MODULE')
mycon.commit()
except:
print('UNABLE TO INSERT!!!!!')
23
def Edit_Profile():
sql="Update student set section=%s where adm_no=%s";
ph=input('\nENTER THE ADMISSION NUMBER WHOSE SECTION
TO MODIFY:')
nm=input('\nENTER THE NEW SECTION(A-D):')
value=(nm,ph)
try:
mycur.execute(sql,value)
mycon.commit()
print('RECORD UPDATED SUCCESSFULLY')
except:
print('UNABLE TO UPDATE SECTION!!!!')
def Remove_Profile():
ph=input('\nENTER THE ADMISSION NUMBER TO DELETE:')
sql='Delete from student where Adm_no=%s'
value=(ph,)
try:
mycur.execute(sql,value)
mycon.commit()
print('RECORD DELETED SUCCESSFULLY')
except:
mycon.rollback()
print('UNABLE TO DELETE RECORD!!!')
24
def Record_Entry():
sql="Insert into
result(adm_no,exam_name,sub1,sub2,sub3,sub4,sub5,total,percentage,atten
dance,grade,remarks)values(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)
"
print('\nPLEASE PROVIDE THE REQUIRED INFORMATION\n')
ad=int(input('\nENTER THE ADMISSION NUMBER TO ENTER
RECORD:'))
nm=input('\nENTER THE EXAM NAME:')
sub1=int(input('ENTER MARKS IN SUBJECT 1(MAX:100):'))
sub2=int(input('ENTER MARKS IN SUBJECT 2(MAX:100):'))
sub3=int(input('ENTER MARKS IN SUBJECT 3(MAX:100):'))
sub4=int(input('ENTER MARKS IN SUBJECT 4(MAX:100):'))
sub5=int(input('ENTER MARKS IN SUBJECT 5(MAX:100):'))
total=sub1+sub2+sub3+sub4+sub5
per=total//5
wrkday=int(input('ENTER TOTAL NUMBER OF WORKING
DAYS:'))
present=int(input('ENTER NO OF DAYS PRESENT:'))
att=present/wrkday*100
att=int(att)
if(per>=90):
g='A'
rem='EXCELLENT PERFORMANCE!!'
elif(per>=75 and per<90):
g='B'
rem='VERY GOOD PERFORMANCE!!'
elif(per>=55 and per<=75):
g='C'
25
rem='SATISFACTORY PERFORMANCE!!'
elif(per>=35 and per<55):
g='D'
rem='AVERAGE PERFORMANCE!!'
else:
g='E'
rem='SCOPE FOR IMPROVEMENT!!'
value=(ad,nm,sub1,sub2,sub3,sub4,sub5,total,per,att,g,rem)
try:
mycur.execute(sql,value)
print('RECORD ADDED SUCCESSFULLY TO EXAM MODULE')
mycon.commit()
except:
print('UNABLE TO INSERT!!!!!')
def Report_Card():
ad=int(input('\nENTER THE ADMISSION NUMBER TO SEARCH:'))
sql1='Select * from student where adm_no=%s'
value=(ad,)
mycur.execute(sql1,value)
rec1=mycur.fetchone()
if(rec1!=None):
adm=rec1[0]
name=rec1[1]
cls=rec1[2]
sec=rec1[3]
sql2='Select * from result where adm_no=%s'
26
value=(ad,)
mycur.execute(sql2,value)
rec2=mycur.fetchone()
if(rec2!=None):
adm=rec2[0]
exname=rec2[1]
sub1=rec2[2]
sub2=rec2[3]
sub3=rec2[4]
sub4=rec2[5]
sub5=rec2[6]
total=rec2[7]
per=rec2[8]
att=rec2[9]
g=rec2[10]
rem=rec2[11]
if(rec1==None and rec2==None):
print('WRONG ADMISSION NUMBER GIVEN!!!!!!')
else:
print('\n\n--------REPORT CARD OF',name,'----------\n\n')
print('\nCLASS-',cls,'SECTION-',sec,'\n')
print('\n------------------------------\n')
print('\nRESULT OF',exname,'\n')
print('\n------------------------------\n')
if(sec=='A'):
print('\n ENGLISH : ',sub1)
print('\n HISTORY : ',sub2)
print('\n POL. SC : ',sub3)
27
print('\n ECONOMICS : ',sub4)
print('\n GEOGRAPHY : ',sub5)
print('\n TOTAL : ',total)
print('\n PERCENTAGE : ',per)
print('\n ATTENDANCE : ',att,'%')
print('\n GRADE : ',g)
print('\n REMAKS : ',rem)
elif(sec=='B'):
print('\n ENGLISH : ',sub1)
print('\n ACCOUNTANCY: ',sub2)
print('\n B.STUDIES : ',sub3)
print('\n ECONOMICS : ',sub4)
print('\n INFO.PRAC : ',sub5)
print('\n TOTAL : ',total)
print('\n PERCENTAGE : ',per)
print('\n ATTENDANCE : ',att,'%')
print('\n GRADE : ',g)
print('\n REMAKS : ',rem)
elif(sec=='C'):
print('\n ENGLISH : ',sub1)
print('\n PHYSICS : ',sub2)
print('\n COMP.SC : ',sub3)
print('\n CHEMISTRY : ',sub4)
print('\n MATHEMATICS: ',sub5)
print('\n TOTAL : ',total)
print('\n PERCENTAGE : ',per)
print('\n ATTENDANCE : ',att,'%')
print('\n GRADE : ',g)
28
print('\n REMAKS : ',rem)
elif(sec=='D'):
print('\n ENGLISH : ',sub1)
print('\n PHYSICS : ',sub2)
print('\n BIO.SC : ',sub3)
print('\n CHEMISTRY : ',sub4)
print('\n MATHEMATICS: ',sub5)
print('\n TOTAL : ',total)
print('\n PERCENTAGE : ',per)
print('\n ATTENDANCE : ',att,'%')
print('\n GRADE : ',g)
print('\n REMAKS : ',rem)
def Remove_Record():
ph=input('\nENTER THE ADMISSION NUMBER TO DELETE:')
sql='Delete from RESULT where Adm_no=%s'
value=(ph,)
try:
mycur.execute(sql,value)
mycon.commit()
print('RECORD DELETED SUCCESSFULLY')
except:
mycon.rollback()
print('UNABLE TO DELETE RECORD!!!')
def Graph():
ad=int(input('\nENTER THE ADMISSION NUMBER TO SEARCH:'))
29
sql1='Select * from result where adm_no=%s'
value=(ad,)
mycur.execute(sql1,value)
T=mycur.fetchone()
sql2='Select section from student where adm_no=%s';
mycur.execute(sql2,value)
s=mycur.fetchone()
L=[T[2],T[3],T[4],T[5],T[6]]
sec=s[0]
if(sec=='A'):
sub1,sub2,sub3,sub4,sub5='English','History','Pol.Sc','Economics','Geogra
phy'
elif(sec=='B'):
sub1,sub2,sub3,sub4,sub5='English','Accountancy','B.Studies','Economics',
'Info.Practices'
elif(sec=='C'):
sub1,sub2,sub3,sub4,sub5='English','Physics','Computer
Sc.','Chemistry','Mathematics'
elif(sec=='D'):
sub1,sub2,sub3,sub4,sub5='English','Physics','Biology','Chemistry','Mathe
matics'
sub=[sub1,sub2,sub3,sub4,sub5]
clr=('red','green','blue','orange','brown')
plt.bar(sub,L,color=clr)
plt.xlabel('Subjects')
plt.ylabel('Marks')
plt.title('Marks Analysis')
30
plt.show()
def Close():
31
Edit_Profile()
elif(choice==3):
Remove_Profile()
elif(choice==4):
Record_Entry()
elif(choice==5):
Report_Card()
elif(choice==6):
Remove_Record()
elif(choice==7):
Graph()
elif(choice==8):
Close()
32
OUTPUT (PYTHON SCREEN)
MAIN MENU
33
EDITING STUDENT PROFILE
34
GENERATING REPORT CARD
PRODUCING GRAPH
35
DELETING STUDENT PROFILE
36
SQL QUERIES USED
CREATE TABLE STUDENT (
adm_no int (6) PRIMARY KEY,
Name varchar (40),
class int (2),
section char (1));
37
SQL OUTPUT SCREEN
38
FUTURE ENHANCEMENT OF PROJECT
39
management systems (LMS) could improve the overall
functionality of the platform and enhance the educational
experience.
40
BIBLIOGRAPHY
1. www.google.com
2. https://pythontrends.wordpress.com
3. BOOK – Python by Sumita Arora
41