Professional Documents
Culture Documents
This is to certify that the Informatics Practices project entitled “SCHOOL MANAGEMENT
SYSTEM”, prepared by of class XII commerce bearing Roll , of Faculty
Senior Secondary School, Geetanagar, Guwahati-781024 embodies the result of his original
work and personal investigations carried out under direct supervision of my guidance. He
has fulfilled all the requirements relating to the submission of the project.
No. :
ACKNOWLEDGEMENT
I would like to express my sincere thanks to Mr. Nilotpal Bordoloi, Principal, Faculty Senior
Secondary School, Geetanagar, Guwahati-781024 for his inspiration and encouragement.
My gratefulness also goes to my companions in my school for their help and valuable
suggestions in bringing out my project.
I convey my heartfelt love to all members of my family who helped me at every step.
At last, but not least I thank God the almighty for his shower of blessings without which
nothing would have been possible.
Date:
Name
Roll Number.
Geetanagar, Guwahati-781024
CONTENTS
Introduction
Requirements
Limitations
Source Code
Output
Bibliography
INTRODUCTION
Computers have made great impact on our everyday life. They are put to use for all sorts of
applications ranging from complex calculations in the field of frontline research,
engineering simulations, down to teaching, printing books and recreational games. The
ease with which computer can process data, store and retrieve it painlessly, have made
them inevitable in office and business environments. The areas of applications of
computers are confined only by limitations of human creativity and imagination in fact; any
task that can be carried out systematically can be performed by a computer. Therefore, it is
essential for every educated person, today we know about a computer, its strengths,
weaknesses, and internal structure. Thus it became the need to include the subject so as to
induce into the minds of the people the fundamentals about a computer.
The topic “SCHOOL MANAGEMENT SYSTEM” has been allotted to me with the aim of
testing the use of computer as a school project and makes us realize the problems that
occur during the process of developing software. Thus, the methodology is to make the
examination process more practical based and realistic by making familiar the students
with real life situations.
Why Python?
Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
Python has a simple syntax similar to the English language.
Python has syntax that allows developers to write programs with fewer lines than
some other programming languages.
Python runs on an interpreter system, meaning that code can be executed as soon as
it is written. This means that prototyping can be very quick.
Python can be treated in a procedural way, an object-orientated way or a functional
way.
Python was designed for readability, and has some similarities to the English
language with influence from mathematics.
Python uses new lines to complete a command, as opposed to other programming
languages which often use semicolons or parentheses.
Python relies on indentation, using whitespace, to define scope; such as the scope of
loops, functions and classes. Other programming languages often use curly-brackets
for this purpose.
MySQL is a fast, easy-to-use RDBMS being used for many small and big businesses. MySQL
is developed, marketed and supported by MySQL AB, which is a Swedish company. MySQL
is becoming so popular because of many good reasons −
MySQL is released under an open-source license. So you have nothing to pay to use
it.
MySQL is a very powerful program in its own right. It handles a large subset of the
functionality of the most expensive and powerful database packages.
MySQL uses a standard form of the well-known SQL data language.
MySQL works on many operating systems and with many languages including PHP,
PERL, C, C++, JAVA, etc.
MySQL works very quickly and works well even with large data sets.
MySQL is very friendly to PHP, the most appreciated language for web
development.
MySQL supports large databases, up to 50 million rows or more in a table. The
default file size limit for a table is 4GB, but you can increase this (if your operating
system can handle it) to a theoretical limit of 8 million terabytes (TB).
MySQL is customizable. The open-source GPL license allows programmers to
modify the MySQL software to fit their own specific environments.
REQUIREMENTS
Operating System- Windows 98/2000/XP/Vista/Linux/Windows 7/Windows 10
Hardware Requirements:
Minimum Required
Processor Pentium IV
Mouse button Standard
Keyboard Standard(101 keys)
Monitor 14inch
FDD 1.44Mb
HDD 80Gb
RAM 1Gb
HEADER FILES USED IN PROGRAM
import os
import platform
import mysql.connector
FUNCTIONS USED IN PROGRAM
search(nm) – To display the records of the students from the database by searching
insert_ex( ) – To insert the records of the examination details of the students in the
database.
display_ex( ) – To display the records of the examination details of the students from
the database.
.
LIMITATIONS
1. Only the basic information of the students can be recorded in the program.
4. Absence of multi level password for entry into the main menu.
SOURCE CODE
import os
import platform
import mysql.connector
#=====STUDENT MANAGEMENT========
def insert():
sname=input("Enter Student Name : ")
admno=int(input("Enter Admission No : "))
dob=input("Enter Date of Birth(yyyy-mm-dd): ")
cls=input("Enter class for admission: ")
cty=input("Enter City : ")
db =
mysql.connector.connect(host="localhost",user="root",passwd="root",database="school")
cursor = db.cursor()
sql="INSERT INTO student(sname,admno,dob,cls,cty) VALUES
( '%s' ,'%d','%s','%s','%s')"%(sname,admno,dob,cls,cty)
try:
cursor.execute(sql)
db.commit()
except:
db.rollback()
db.close()
def display():
try:
db =
mysql.connector.connect(host="localhost",user="root",passwd="root",database="school")
cursor = db.cursor()
sql = "SELECT * FROM student"
cursor.execute(sql)
print("-"*70)
print("Student Name Adm. No. DOB Class City")
print("-"*70)
for i in cursor:
print(i[0],"\t",i[1],"\t",i[2],"\t ",i[3],"\t ",i[4]," \t")
print("-"*70)
except:
print ("Error: unable to fetch data")
db.close()
def search(nm):
try:
db =
mysql.connector.connect(host="localhost",user="root",passwd="root",database="school")
cursor = db.cursor()
sql = "SELECT * FROM student where sname=%s"
val=(nm,)
cursor.execute(sql,val)
print("-"*70)
print("Student Name Adm. No. DOB Class City")
print("-"*70)
for i in cursor:
print(i[0],"\t",i[1],"\t",i[2],"\t ",i[3],"\t ",i[4]," \t")
print("-"*70)
except:
print ("Error: unable to fetch data")
db.close()
def update():
try:
db =
mysql.connector.connect(host="localhost",user="root",passwd="root",database="school")
cursor = db.cursor()
tempst=int(input("Enter Admission No : "))
temp=input("Enter new class : ")
cursor.execute("update student set cls='"+temp+"' where admno='"+str(tempst)+"'")
db.commit()
except Exception as e:
print (e)
db.close()
def delete():
temp=int(input("\nEnter adm no to be deleted : "))
try:
ans=input("Are you sure you want to delete the record(y/n) : ")
if ans=='y' or ans=='Y':
cursor.execute("delete from student where admno='"+str(temp)+"'")
db.commit()
except Exception as e:
print (e)
db.close()
#=========EXAM MANAGEMENT============
def insert_ex():
roll=int(input("Enter Admission No : "))
sname=input("Enter the name : ")
print("Enter the marks of 5 subject")
eng=int(input("ENGLISH : "))
math=int(input("MATH : "))
sc=int(input("SCIENCE : "))
sst=int(input("SOCIAL SC. : "))
ass=int(input("ASSAMESE : "))
db =
mysql.connector.connect(host="localhost",user="root",passwd="root",database="school")
cursor = db.cursor()
sql="INSERT INTO exam(roll,sname,eng,math,sc,sst,ass) VALUES
( '%d' ,'%s','%d','%d','%d','%d','%d')"%(roll,sname,eng,math,sc,sst,ass)
try:
cursor.execute(sql)
db.commit()
except:
db.rollback()
db.close()
def display_ex():
try:
db =
mysql.connector.connect(host="localhost",user="root",passwd="root",database="school")
cursor = db.cursor()
sql = "SELECT * FROM exam"
cursor.execute(sql)
print("-"*70)
print("Roll No. Name. English Math Science Social. Sc. Assamese")
print("-"*70)
for i in cursor:
print(i[0],"\t",i[1],"\t\t",i[2],"\t",i[3],"\t",i[4],"\t\t",i[5],"\t\t",i[6],"\t")
per=i[2]+i[3]+i[4]+i[5]+i[6]/5
print("Percentage = ",per)
if per>=90:
print("Grade = A")
elif per>=80 and per<90:
print("Grade = B")
elif per>=70 and per<80:
print("Grade = C")
elif per>=60 and per<70:
print("Grade = D")
elif per>=50 and per<60:
print("Grade = E")
else:
print("Grade = FAIL")
print("-"*70)
print("-"*70)
except:
print ("Error: unable to fetch data")
db.close()
while True:
db =
mysql.connector.connect(host="localhost",user="root",passwd="root",database="school")
cursor = db.cursor()
print('-----------------------------------\nWELCOME TO SCHOOL MANAGEMENT SYSTEM\
n-----------------------------------')
print("1.STUDENT MANAGEMENT")
print("2.EXAM MANAGEMENT")
ch=int(input("\nEnter ur choice (1-2) : "))
if ch==1:
print('\nWELCOME TO STUDENT MANAGEMENT SYSTEM\n')
print('a.NEW ADMISSION')
print('b.DISPLAY DETAILS')
print('c.SEARCH')
print('d.UPDATE')
print('e.DELETE')
c=input("Enter ur choice (a-c) : ")
if c=='a':
insert()
elif c=='b':
display()
elif c=='c':
nm=input(" Enter the name of the student :")
search(nm)
elif c=='d':
update()
elif c=='e':
delete()
else:
print('Enter correct choice...!!')
elif ch==2:
print('WELCOME TO EXAM MANAGEMENT SYSTEM')
print('a.EXAM DETAILS')
print('b.DISPLAY DETAILS ')
c=input("Enter ur choice : ")
if c=='a':
insert_ex()
elif c=='b':
display_ex()
else:
print('Enter correct choice...!!')
else:
print('Enter correct choice..!!')
OUTPUT
www.wikipedia.org
www.w3schools.com