School Management System (Main Content)
School Management System (Main Content)
1. Bonafide certificate
2. Acknowledgement
3. Introduction
4. Operation
5. System Analysis
6. Source Code
7. Output
8. Conclusion
9. Cd
Introduction
PURPOSE:
School
Management
System
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
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)")
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]+" : "))
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)")
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)")
#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;
XYZ
Mr. PQR
Mrs. MNO
2. Update Student Details -
3. Update Student Marks -
4. Update Contact Details -
XYZ
Mr. PQR
Mrs. MNO
6. View list of students -
ABC
XYZ
EFG
IJK
XYZ
8. Issue TC - We can Issue TC to a student.
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.