0% found this document useful (0 votes)
7 views

School Management System (Main Content)

Uploaded by

atomicrog38
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

School Management System (Main Content)

Uploaded by

atomicrog38
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

CONTENT

1. Bonafide certificate

2. Acknowledgement

3. Introduction

4. Operation

5. System Analysis

6. Source Code

7. Output

8. Conclusion

9. Cd
Introduction

AIM OF THE PROJECT:

This project has been prepared as a requirement for


AISSCE-2020-21.Its main aim is to develop a python
program which manages the working of a School.

PURPOSE:

The purpose of this project is to ease the


management of a School. It uses Python
programming with SQL connectivity concepts to
make the work easier and support the smooth
functioning of a school.

This is Python Projects on School Management


system, which provided a lot of facility to teacher to
manage their activity easily.
The objective and scope of my Project School
Management system is to record the details various
activities of teacher. It will simplify the task and
reduce the paper work.
OPERATIONS:

1. Add Student details - Register a student by entering


following details:-

2. Update Student Details - Update student details


according to UID.
3. Update Student Marks - Update student Marks
according to UID.

4. Update Contact Details - Update student contact details


according to UID.

5. View student details - We can view all details of a


student.

6. View list of students - We can view list of all students.

7. View Student Report Card - We can view report card of


a student.

8. Issue TC - We can Issue TC to a student.

9. View Issued TC - We can view list of TC.

0. Exit – Exit from application.


SYSTEM DESIGN

School
Management
System

Python Program SQL Relation

Database
Methods
(BEACHWOOD)

Relation
add()
(student)

Relation
update_details()
(marks)

Relation
update_marks() (TC)

update_contact()

list_all()

report()

tc()

view_tc()
SCHOOL MANAGEMENT SYSTEM
(SOURCE CODE)

import os
import mysql.connector as sc

#Function to check availibity of a roll no.


def checkroll(roll,clas):
con=sc.connect(host='localhost',user='root',passwd='12345',database='BEACHWOOD')
cur=con.cursor()
cur.execute("Select count(*) from student where class={} and roll={} ".format(clas,roll))
data=cur.fetchall()
d=data[0][0]
con.close()
return d

#Function to check for UID.


def checkuid(uid):
con=sc.connect(host='localhost',user='root',passwd='12345',database='BEACHWOOD')
cur=con.cursor()
cur.execute("Select count(*) from student where uid={}".format(uid))
data=cur.fetchall()
d=data[0][0]
con.close()
return d

#Function to check for class.


def checkclass(clas):
con=sc.connect(host='localhost',user='root',passwd='12345',database='BEACHWOOD')
cur=con.cursor()
cur.execute("Select count(*) from student where class={}".format(clas))
data=cur.fetchall()
d=data[0][0]
con.close()
return d

#Function to get for class and stream.


def get_class_stream(uid):
con=sc.connect(host='localhost',user='root',passwd='12345',database='BEACHWOOD')
cur=con.cursor()
cur.execute("Select class,stream from student where uid={}".format(uid))
data=cur.fetchone()
con.close()
return data

#Function to print list of subject.


def get_subject(clas,stream):
if clas>=1 and clas<=5:
print('************************************************************')
print('* *')
print('* 1. English *')
print('* 2. Hindi *')
print('* 3. Mathematics *')
print('* 4. EVS *')
print('* *')
print('************************************************************')
elif clas>=6 and clas<=10:
print('************************************************************')
print('* *')
print('* 1. English *')
print('* 2. Hindi *')
print('* 3. Mathematics *')
print('* 4. Science *')
print('* 5. Social Studies *')
print('* *')
print('************************************************************')
elif (clas>=11 and clas<=12) and stream=='Science':
print('************************************************************')
print('* *')
print('* 1. English *')
print('* 2. Maths *')
print('* 3. Physics *')
print('* 4. Chemistry *')
print('* 5. Biology / Computer Sc. *')
print('* *')
print('************************************************************')
elif (clas>=11 and clas<=12) and stream=='Arts':
print('************************************************************')
print('* *')
print('* 1. English *')
print('* 2. Hindi *')
print('* 3. History *')
print('* 4. Geography *')
print('* 5. Economics *')
print('* *')
print('************************************************************')

#Function to add basic details of student


def add():
os.system('cls')
ch='y'
while ch=='y' or ch=='Y':
con=sc.connect(host='localhost',database='BEACHWOOD',user='root',password='12345')
cur=con.cursor()
try:
os.system('cls')
print('************************************************************')
print('* School Management System *')
print('************************************************************')
clas=int(input(" Enter Class (1-12)\t\t\t: "))
stream='NA'
if clas>10:
while True:
print(" List of streams:- ")
print(" 1. Science")
print(" 2. Arts")
st=int(input(" Choose Stream\t\t\t: "));
if st==1:
stream="Science";
elif st==2:
stream="Arts";
else:
print(" Choose correct option!!! ")
continue
break

roll=int(input(" Enter roll no\t\t\t: "))


while checkroll(roll,clas):
print(" Entered roll no. already Exits ")
roll=int(input(" Enter another roll no\t\t: "))
name=input(" Enter Student Name\t\t\t: ")
dob=input(" Enter Date of birth (yyyy-mm-dd)\t: ")
admdate=input(" Enter admission Date (yyyy-mm-dd)\t: ")
fname=input(" Enter Fathers Name\t\t\t: ")
mname=input(" Enter Mothers Name\t\t\t: ")
uid=str(clas)+'00'+str(roll)

cur.execute("insert into student(class,stream,roll,uid,name,adm_date,f_name,m_name,dob)


values({},'{}',{},'{}','{}','{}','{}','{}','{}')".format(clas,stream,roll,uid,name,admdate,fname,mname,dob))
con.commit()
for i in ["PT1","PT2","HALF","PT3","SE"]:
cur.execute("insert into marks(mid,test) values('{}','{}')".format(uid,i))
con.commit()
print('************************************************************')
print("\t\tSuccesfully Inserted")
print('************************************************************')
ch=input("\tDo you want to enter another record?(y/n)")
con.close()
except:
print('************************************************************')
print("\t\tError!!!... during insertion.")
print('************************************************************')
ch=input("\tDo you want to try with another data?(y/n)")

#Function to update basic details of student


def update_details():
ch='y'
while ch=='y' or ch=='Y':
try:
con=sc.connect(host='localhost',user='root',password='12345',database='BEACHWOOD')
cur=con.cursor()
os.system('cls')
print('************************************************************')
print('* School Management System *')
print('************************************************************')
print('* Note:- All marks will be deleted of previous class *')
print('************************************************************')
uid=input(' Enter the UID no.to update Details :- ')
while checkuid(uid)==0:
print(" Entered UID. Not Exits ")
uid=input(' Enter another UID no.to update Details :- ')
print('************************************************************')
print('* *')
print('* 1. Class *')
print('* 2. Stream *')
print('* 3. Roll *')
print('* 4. Name *')
print('* 5. Date of Birth *')
print('* 6. Addmission Date *')
print('* 7. Father\'s Name *')
print('* 8. Mother\'s Name *')
print('* *')
print('************************************************************')
opt=int(input(' Enter Option :- '))
print('************************************************************')
if opt==1:
clas=int(input("\t\tEnter new Class : "))
l=uid.split('00')
uidm=str(clas)+'00'+l[1]
if checkuid(int(uidm)):
print(" UID. already Exits ")
roll=int(input(' Enter another Roll no. for update :- '))
while checkroll(roll,clas):
print(" Entered Roll no. already Exits ")
roll=int(input(" Enter another Roll no. for update\t\t: "))
uidm=str(clas)+'00'+str(roll)
cur.execute("update student set roll={} where uid={}".format(roll,int(uid)))
con.commit()
stream='NA'
if clas>10:
while True:
print(" List of streams:- ")
print(" 1. Science")
print(" 2. Arts")
st=int(input(" Choose Stream\t\t\t: "));
if st==1:
stream="Science";
elif st==2:
stream="Arts";
else:
print(" Choose correct option!!! ")
continue
break
cur.execute("update marks set mid={},english =0, hindi =0, science =0, maths =0, sst =0, evs
=0, physics =0, chemistry =0, biology_cs =0, history =0, geography=0, economics=0 where
mid={}".format(int(uidm),int(uid)))
con.commit()
cur.execute("update student set class={},stream='{}', uid={} where
uid={}".format(clas,stream,int(uidm),int(uid)))
elif opt==2:
stream='NA'
l=uid.split('00')
if int(l[0])>10:
while True:
print(" List of streams:- ")
print(" 1. Science")
print(" 2. Arts")
st=int(input(" Choose Stream\t\t\t: "));
if st==1:
stream="Science";
elif st==2:
stream="Arts";
else:
print(" Choose correct option!!! ")
continue
break
cur.execute("update student set stream='{}' where uid={}".format(stream,int(uid)))
else:
print("\t\tStream update not allow ")
elif opt==3:
roll=int(input("\t\tEnter new Roll : "))
l=uid.split('00')
while checkroll(roll,int(l[0])):
print(" Entered roll no. already Exits ")
roll=int(input(" Enter another roll no\t\t: "))
uidm=l[0]+'00'+str(roll)
uidm=int(uidm)
cur.execute("update marks set mid={} where mid={}".format(uidm,int(uid)))
con.commit()
cur.execute("update student set roll={}, uid={} where uid={}".format(roll,uidm,int(uid)))
elif opt==4:
name=input("\t\tEnter new Name : ")
cur.execute("update student set name='{}' where uid={}".format(name,int(uid)))
elif opt==5:
dob=input("\t\tEnter new Date of Birth (yyyy-mm-dd) : ")
cur.execute("update student set dob='{}' where uid={}".format(dob,int(uid)))
elif opt==6:
adm_date=input("\t\tEnter new admission date (yyyy-mm-dd) : ")
cur.execute("update student set adm_date='{}' where uid={}".format(adm_date,int(uid)))
elif opt==7:
fname=int(input("\t\tEnter new Father\'s Name : "))
cur.execute("update student set fname='{}' where uid={}".format(fname,int(uid)))
elif opt==7:
mname=input("\t\tEnter new Mother\'s Name : ")
cur.execute("update student set mname='{}' where uid={}".format(mname,int(uid)))

con.commit()
print('************************************************************')
print("\t\tDetails Succesfully Updated")
print('************************************************************')
ch=input("\tDo you want to Update another record?(y/n)")
con.close()
except:
print('************************************************************')
print("\t\tError!!!... during updating.")
print('************************************************************')
ch=input("\tDo you want to try with another data?(y/n)")

#Function to update marks of student


def update_marks():
ch='y'
while ch=='y' or ch=='Y':
try:
con=sc.connect(host='localhost',user='root',password='12345',database='BEACHWOOD')
cur=con.cursor()
os.system('cls')
print('************************************************************')
print('* School Management System *')
print('************************************************************')
uid=int(input(' Enter the UID no.to update Marks :- '))
while checkuid(uid)==0:
print(" Entered UID. Not Exits ")
uid=int(input(' Enter another UID no.to update Marks :- '))
print('************************************************************')
print('* *')
print('* 1. Periodic Test 1 *')
print('* 2. Periodic Test 2 *')
print('* 3. Half Yearly *')
print('* 4. Periodic Test 3 *')
print('* 5. Session Ending *')
print('* *')
print('************************************************************')
opt=int(input(' Enter Option :- '))
print('************************************************************')
clas,stream=get_class_stream(uid);
clas=int(clas)
if clas>=1 and clas<=5:
get_subject(clas,stream)
opt2=int(input(' Enter Option :- '))
print('************************************************************')
sub=["English","Hindi","Maths","EVS"]
mark=int(input("\t\tEnter Marks of "+sub[opt2-1]+" : "))
elif clas>=6 and clas<=10:
get_subject(clas,stream)
opt2=int(input(' Enter Option :- '))
print('************************************************************')
sub=["English","Hindi","Maths","Science","SST"]
mark=int(input("\t\tEnter Marks of "+sub[opt2-1]+" : "))
elif (clas>=11 and clas<=12) and stream=='Science':
get_subject(clas,stream)
opt2=int(input(' Enter Option :- '))
print('************************************************************')
sub=["English","Maths","Physics","Chemistry","Biology_CS"]
if sub[opt2-1]=="Biology_CS":
mark=int(input("\tEnter Marks of Biology / Computer Sc. : "))
else:
mark=int(input("\t\tEnter Marks of "+sub[opt2-1]+" : "))
elif (clas>=11 and clas<=12) and stream=='Arts':
get_subject(clas,stream)
opt2=int(input(' Enter Option :- '))
print('************************************************************')
sub=["English","Hindi","History","Geography","Economics"]
mark=int(input("\t\tEnter Marks of "+sub[opt2-1]+" : "))

test=["PT1","PT2","HALF","PT3","SE"]
while opt==1 and (mark>50 or mark<0):
print("Please give marks between 0 to 50)")
if sub[opt2-1]=="Biology_CS":
mark=int(input("\tEnter Marks of Biology / Computer Sc. : "))
else:
mark=int(input("\t\tEnter Marks of "+sub[opt2-1]+" : "))
while opt==2 and (mark>50 or mark<0):
print("Please give marks between 0 to 50)")
if sub[opt2-1]=="Biology_CS":
mark=int(input("\tEnter Marks of Biology / Computer Sc. : "))
else:
mark=int(input("\t\tEnter Marks of "+sub[opt2-1]+" : "))
while opt==3 and (mark>100 or mark<0):
print("Please give marks between 0 to 100)")
if sub[opt2-1]=="Biology_CS":
mark=int(input("\tEnter Marks of Biology / Computer Sc. : "))
else:
mark=int(input("\t\tEnter Marks of "+sub[opt2-1]+" : "))
while opt==4 and (mark>50 or mark<0):
print("Please give marks between 0 to 50)")
if sub[opt2-1]=="Biology_CS":
mark=int(input("\tEnter Marks of Biology / Computer Sc. : "))
else:
mark=int(input("\t\tEnter Marks of "+sub[opt2-1]+" : "))
while opt==5 and (mark>100 or mark<0):
print("Please give marks between 0 to 100)")
if sub[opt2-1]=="Biology_CS":
mark=int(input("\tEnter Marks of Biology / Computer Sc. : "))
else:
mark=int(input("\t\tEnter Marks of "+sub[opt2-1]+" : "))

cur.execute("update marks set {}={} where mid={} and test='{}'".format(sub[opt2-


1],mark,uid,test[opt-1]))
con.commit()
print('************************************************************')
print("\t\tMarks Succesfully Updated")
print('************************************************************')
ch=input("\tDo you want to Update another Mark?(y/n)")
con.close()
except:
print('************************************************************')
print("\t\tError!!!... during updating.")
print('************************************************************')
ch=input("\tDo you want to try with another data?(y/n)")

#Function to update contact details of student


def update_contact():
ch='y'
while ch=='y' or ch=='Y':
try:
con=sc.connect(host='localhost',user='root',password='12345',database='BEACHWOOD')
cur=con.cursor()
os.system('cls')
print('************************************************************')
print('* School Management System *')
print('************************************************************')
uid=input(' Enter the UID no.to update Contact Details :- ')
while checkuid(uid)==0:
print(" Entered UID. Not Exits ")
uid=input(' Enter another UID no.to update Contact Details :- ')
print('************************************************************')
print('* *')
print('* 1. Email *')
print('* 2. Mobile No. *')
print('* 3. Address *')
print('* *')
print('************************************************************')
opt=int(input(' Enter Option :- '))
print('************************************************************')

if opt==1:
email=input("\t\tEnter new Email : ")
cur.execute("update student set email='{}' where uid={}".format(email,int(uid)))
elif opt==2:
mob=int(input("\t\tEnter new Mobile No. : "))
cur.execute("update student set mob='{}' where uid={}".format(mob,int(uid)))
elif opt==3:
adr=input("\t\tEnter new Address : ")
cur.execute("update student set address='{}' where uid={}".format(adr,int(uid)))

con.commit()
print('************************************************************')
print("\t\tDetails Succesfully Updated")
print('************************************************************')
ch=input("\tDo you want to Update another record?(y/n)")
con.close()
except:
print('************************************************************')
print("\t\tError!!!... during updating.")
print('************************************************************')
ch=input("\tDo you want to try with another data?(y/n)")

#Function to view student details with uid


def view():
ch='y'
while ch=='y' or ch=='Y':
try:
con=sc.connect(host='localhost',user='root',password='12345',database='BEACHWOOD')
cur=con.cursor()
os.system('cls')
print('************************************************************')
print('* School Management System *')
print('************************************************************')
uid=int(input(' Enter the UID no.to View Details :- '))
while checkuid(uid)==0:
print(" Entered UID. Not Exits ")
uid=int(input(' Enter another UID no.to View Details :- '))
cur.execute("Select * from student where uid={}".format(uid))
data=cur.fetchone()
os.system('cls')
print('************************************************************')
print('* Student Details *')
print('************************************************************')
print(' Class : ',data[0])
print(' Stream : ',data[1])
print(' Roll : ',data[2])
print(' UID : ',data[3])
print(' Name : ',data[4])
print(' Date of Birth : ',data[8])
print(' Admission Date : ',data[5])
print(' Father\'s Name : ',data[6])
print(' Mother\'s Name : ',data[7])
print(' Mobile no. : ',data[9])
print(' Email id : ',data[10])
print(' Address : ',data[11])
print('************************************************************')
ch=input("\tDo you want to View another record?(y/n)")
con.close()
except:
print('************************************************************')
print("\t\tError!!!... during updating.")
print('************************************************************')
ch=input("\tDo you want to try with another data?(y/n)")

#Function to view list of student with class


def list_all():
ch='y'
while ch=='y' or ch=='Y':
try:
con=sc.connect(host='localhost',user='root',password='12345',database='BEACHWOOD')
cur=con.cursor()
os.system('cls')
print('************************************************************')
print('* School Management System *')
print('************************************************************')
clas=int(input(' Enter the Class to View List of Students :- '))
while checkclass(clas)==0:
print(" Entered class. Not Exits ")
clas=int(input(' Enter another Class to View List of Students :- '))
stream='NA'
if clas>10:
while True:
print(" List of streams:- ")
print(" 1. Science")
print(" 2. Arts")
st=int(input(" Choose Stream\t\t\t: "));
if st==1:
stream="Science";
elif st==2:
stream="Arts";
else:
print(" Choose correct option!!! ")
continue
break
cur.execute("Select uid,stream,roll,name from student where class={} and
stream='{}'".format(clas,stream))
data=cur.fetchall()
os.system('cls')
print('************************************************************')
print('* List of Students *')
print('************************************************************')
print('\tUID\t STREAM\tROLL\t NAME')
print('************************************************************')
print('\t',end="")
for row in data:
for d in row:
print(d,end='\t ')
print()
if not row==data[-1]:
print('\t',end="")
print('************************************************************')
ch=input("\tDo you want to view another records?(y/n)")
con.close()
except:
print('************************************************************')
print("\t\tError!!!... during Viewing.")
print('************************************************************')
ch=input("\tDo you want to try with another data?(y/n)")

#Function to generate report card


def report():
ch='y'
while ch=='y' or ch=='Y':
try:
con=sc.connect(host='localhost',user='root',password='12345',database='BEACHWOOD')
cur=con.cursor()
os.system('cls')
print('************************************************************')
print('* School Management System *')
print('************************************************************')
uid=int(input(' Enter the UID no.to View Details :- '))
while checkuid(uid)==0:
print(" Entered UID. Not Exits ")
uid=int(input(' Enter another UID no.to View Details :- '))
cur.execute("Select * from student where uid={}".format(uid))
data=cur.fetchone()
os.system('cls')
print('************************************************************')
print('* Report Card *')
print('************************************************************')
print(' Class : ',data[0],' Stream : ',data[1])
print(' Roll : ',data[2],' UID : ',data[3])
print('************************************************************')
print(' Name : ',data[4])
print('************************************************************')
if data[0]>=1 and data[0]<=5:
cur.execute("Select test,english,maths,hindi,evs from marks where mid={}".format(uid))
data1=cur.fetchall()
print(" Eng Maths Hin Evs Total Weight")
remarks="PASS"
weightage=0
for row in data1:
total=0
for d in row:
print(d,end='\t')
if type(d)==int:
total=total+d
if row[0] in ["PT1","PT2","PT3"]:
wei=total/250*10
elif row[0]=="HALF":
wei=total/500*30
elif row[0]=="SE":
wei=total/500*40
print(total,end=" ")
weightage=weightage+wei
print(round(wei,2),end=" ")
print()
if weightage<33:
remarks="FAIL"

elif data[0]>=6 and data[0]<=10:


cur.execute("Select test,english,maths,hindi,science,sst from marks where
mid={}".format(uid))
data1=cur.fetchall()
print(" Eng Maths Hin Sci SST Total Weight")
remarks="PASS"
weightage=0
for row in data1:
total=0
for d in row:
print(d,end='\t')
if type(d)==int:
total=total+d
if row[0] in ["PT1","PT2","PT3"]:
wei=total/250*10
elif row[0]=="HALF":
wei=total/500*30
elif row[0]=="SE":
wei=total/500*40
print(total,end=" ")
weightage=weightage+wei
print(round(wei,2),end=" ")
print()
if weightage<33:
remarks="FAIL"

elif (data[0]>=11 and data[0]<=12) and data[1]=='Science':


cur.execute("Select test,english,maths,physics,chemistry,biology_cs from marks where
mid={}".format(uid))
data1=cur.fetchall()
print(" Eng Maths Phy Chem Bio\\CS Total Weight")
remarks="PASS"
weightage=0
for row in data1:
total=0
for d in row:
print(d,end='\t')
if type(d)==int:
total=total+d
if row[0] in ["PT1","PT2","PT3"]:
wei=total/250*10
elif row[0]=="HALF":
wei=total/500*30
elif row[0]=="SE":
wei=total/500*40
print(total,end=" ")
weightage=weightage+wei
print(round(wei,2),end=" ")
print()
if weightage<33:
remarks="FAIL"

elif (data[0]>=11 and data[0]<=12) and data[1]=='Arts':


cur.execute("Select test,english,hindi,history,geography,economics from marks where
mid={}".format(uid))
data1=cur.fetchall()
print(" Eng Hin Hist Geo Eco Total Weight")
remarks="PASS"
weightage=0
for row in data1:
total=0
for d in row:
print(d,end='\t')
if type(d)==int:
total=total+d
if row[0] in ["PT1","PT2","PT3"]:
wei=total/250*10
elif row[0]=="HALF":
wei=total/500*30
elif row[0]=="SE":
wei=total/500*40
print(total,end=" ")
weightage=weightage+wei
print(round(wei,2),end=" ")
print()
if weightage<33:
remarks="FAIL"

print('************************************************************')
print(' Weightage : ',round(weightage,2),' Remarks : ',remarks )
print('************************************************************')
ch=input("\tDo you want to View another record?(y/n)")
con.close()
except:
print('************************************************************')
print("\t\tError!!!... during Viewing.")
print('************************************************************')
ch=input("\tDo you want to try with another data?(y/n)")

#Function to issue TC
def tc():
ch='y'
while ch=='y' or ch=='Y':
try:
con=sc.connect(host='localhost',user='root',password='12345',database='BEACHWOOD')
cur=con.cursor()
os.system('cls')
print('************************************************************')
print('* School Management System *')
print('************************************************************')
uid=int(input(' Enter the UID no. to issue TC :- '))
while checkuid(uid)==0:
print(" Entered UID. Not Exits ")
uid=int(input(' Enter another UID no.to issue TC :- '))
cur.execute("insert into TC select class,stream,name,adm_date,f_name,m_name,dob from
student where uid={}".format(uid))
con.commit()
cur.execute("delete from marks where mid={}".format(uid))
con.commit()
cur.execute("delete from student where uid={}".format(uid))
con.commit()
os.system('cls')
print('************************************************************')
print('* School Management System *')
print('************************************************************')
print('* *')
print('* TC SUCCESSFULLY GENERATED *')
print('* *')
print('************************************************************')
ch=input("\tDo you want to issue another TC?(y/n)")
con.close()
except:
print('************************************************************')
print("\t\tError!!!... during Issueing TC.")
print('************************************************************')
ch=input("\tDo you want to try with another data?(y/n)")

#Function to view list of TC issued


def view_tc():
ch='y'
while ch=='y' or ch=='Y':
try:
con=sc.connect(host='localhost',user='root',password='12345',database='BEACHWOOD')
cur=con.cursor()
os.system('cls')
print('************************************************************')
print('* School Management System *')
print('************************************************************')
cur.execute("Select class,stream,name from TC ")
data=cur.fetchall()
os.system('cls')
print('************************************************************')
print('* TC ISSUED *')
print('************************************************************')
print('\t\tCLASS\t STREAM NAME')
print('************************************************************')
print('\t\t',end="")
for row in data:
for d in row:
print(d,end='\t ')
print()
if not row==data[-1]:
print('\t\t',end="")
print('************************************************************')
ch=input()
con.close()
except:
print('************************************************************')
print("\t\tError!!!... during Viewing TC.")
print('************************************************************')
ch=input("\tDo you want to try with another data?(y/n)")

#Main
ch=1
while ch!=0 :
os.system('cls')
print('************************************************************')
print('* School Management System *')
print('************************************************************')
print('* *')
print('* 1. Add Student Details *')
print('* 2. Update Student Details *')
print('* 3. Update Student Marks *')
print('* 4. Update Contact Details *')
print('* 5. View Student Details *')
print('* 6. View List of Students *')
print('* 7. View student Report card *')
print('* 8. Issue TC *')
print('* 9. View Issued TC *')
print('* 0. Exit *')
print('* *')
print('************************************************************')
ch=int(input(' Enter Option :- '))
if ch==1:
add()
elif ch==2:
update_details()
elif ch==3:
update_marks()
elif ch==4:
update_contact()
elif ch==5:
view()
elif ch==6:
list_all()
elif ch==7:
report()
elif ch==8:
tc()
elif ch==9:
view_tc()
SQL CODE
create database BEACHWOOD;

create table student(


class int not null,
stream varchar(15) default 'NA',
roll int not null,
uid int primary key,
name varchar(30) not null,
adm_date date,
f_name varchar(30),
m_name varchar(30),
dob date,
mob varchar(10) default 'NA' ,
email varchar(50) default 'NA',
address varchar(100) default 'NA');

create table marks(


mid int not null,test varchar(30),
english int default 0,
hindi int default 0,
science int default 0,
maths int default 0,
sst int default 0,
evs int default 0,
physics int default 0,
chemistry int default 0,
biology_cs int default 0,
history int default 0,
geography int default 0,
economics int default 0);

create table TC(class int not null,


stream varchar(15) default 'NA',
name varchar(30) not null,
adm_date date,
f_name varchar(30),
m_name varchar(30),
dob date);
OUTPUT

1. Add Student details -

XYZ

Mr. PQR
Mrs. MNO
2. Update Student Details -
3. Update Student Marks -
4. Update Contact Details -

[email protected]

5. View student details -

XYZ

Mr. PQR
Mrs. MNO
6. View list of students -

ABC
XYZ
EFG
IJK

7. View Student Report Card -

XYZ
8. Issue TC - We can Issue TC to a student.

9. View Issued TC - We can view list of TC.

XYZ
IJK
CONCLUSION
This project is based on the usage of Data Files in our day-to-day
lives. Hopefully it might be able to demonstrate how to put into
application the concept of the features of python to make our work
easier. It consists of the modular programming, SQL Connectivity
and other common features like structure, loops,condition
statements etc. which handle all the transactions of a School
management including opening an student record and close it.
This concept can be utilised in other institutions and
organisations making least possible use of labour.
I hope it provides efficient methods for storing data in a concise
manner and proves to be useful in some context.

You might also like