[go: up one dir, main page]

0% found this document useful (0 votes)
20 views23 pages

Cs Project 1

The document outlines a School Management System project created by Ayush Mishra and Prajwal Raut, detailing its purpose, which is to streamline educational processes using technology. It includes sections on local information, table structures, coding in Python, and outputs, demonstrating functionalities such as student management, employee management, fee management, and exam management. The conclusion emphasizes the project's goal of replacing manual tasks to save space and money.

Uploaded by

prajwal.raut
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views23 pages

Cs Project 1

The document outlines a School Management System project created by Ayush Mishra and Prajwal Raut, detailing its purpose, which is to streamline educational processes using technology. It includes sections on local information, table structures, coding in Python, and outputs, demonstrating functionalities such as student management, employee management, fee management, and exam management. The conclusion emphasizes the project's goal of replacing manual tasks to save space and money.

Uploaded by

prajwal.raut
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 23

COMPUTER

SCIENCE
PROJECT

Made by:- Ayush Mishra and Prajwal Raut


Roll no:- 05 and 14
Class:- 12th ‘A’ (Science)
School:- School of Scholars
INDEX

 TOPIC

 INTRODUCTION

 LOCAL INFORMATION ABOUT PROJECT

 TABLE STRUCTURES

 CODING IN PYTHON

 OUTPUTS

 CONCLUSION
TOPIC:-

SCHOOL MANAGEMENT

Introduction

Education system forms the backbone of every nation. And hence it is


important to provide a strong educational foundation to the young
generation to ensure the development of open-minded global citizens
securing the future for everyone. Advanced technology available
today can play a crucial role in streamlining education related
processes to promote among students, teachers, parents and the school
staff.

School Management System consists of tasks such as registering


students, attendance record keeping controlling absentees, producing
report cards, producing official transcript, preparing timetable and
producing different reports for teachers and parents.

LOCAL INFORMATION ABOUT PROJECT


o DBMS: MySQL
o Host: local host
o User: root
o Password: Kyokasuigetsu
o Database: School

TABLE STRUCTURES

TABLE: STUDENT
Table: emp
Table: Fee
Table: Exam
PYTHON CODING

import os
import platform
import student.connector
def selection():
db= school.connector.conect(user=’root’, password=’Kyokasuigetsu’,
host=’local host’, database=’MySQL’)
cursor= db.cursor()
print(‘ ----------------------------\NWELCOME TO SCHOOL
MANAGEMENT SYSTEM\n----------------------------‘)
print(“1.STUDENT MANAGEMENT”)
print(“2.EMPLOYEE MANAGEMENT”)
print(“3.FEE MANAGEMENT”)
print(“4. EXAM MANAGEMENT”)
ch=int(input(“\nEnter ur choice (1-4) : “))
if ch==1:
print(‘\nWELCOME TO STUDENT MANAGEMENT SYSTEM\n’)
print(‘a. NEW ADMISSION’)
print(‘b. UPDATE STUDENT DETAILS’)
print(‘c. ISSUE TC’)
c=input(“Enter ur choice (a-c): “)
print(‘\nInitially the details are..\n’)
display1()
if c==’a’:
insert1()
print(‘\nModified details are..\n’)
display1()
elif c==’b’:
update1()
print(‘\nModified details are..\n’)
display1()
elif c==’c’:
delete1()
print(‘\nModified details are..\n’)
display1()
else:
print(‘Enter correct choice….!!’)
elif ch==2:
print(‘WELCOME TO EMPLOYEE MANAGEMENT SYSTEM’)
print(‘a.NEW EMPLOYEE’)
print(‘b.UPDATE STAFF DETAILS’)
print(c. DELETE EMPLOYEE’)
c=input(“Enter ur choice: “)
if c==’a’:
insert2()
print('\nModified details are..\n')
display2()
elif c=='b':
update2()
print('\nModified details are..\n')
display2()
elif c=='c':
delete2()
print('\nModified details are..\n')
display2()
else: print('Enter correct choice...!!')
elif ch==3:
print('WELCOME TO FEE MANAGEMENT SYSTEM')
print('a.NEW FEE')
print('b.UPDATE FEE')
print('c.EXEMPT FEE')
c=input("Enter ur choice: ")
if c=='a':
insert3()
elif c=='b':
update3()
elif c=='c':
delete3()
else:
print('Enter correct choice...!!')
elif ch==4:
print('WELCOME TO EXAM MANAGEMENT SYSTEM')
print('a.EXAM DETAILS')
print('b.UPDATE DETAILS ')
print('c.DELETE DETAILS')
c=input("Enter ur choice : ")
if c=='a':
insert4()
elif c=='b':
update4()
elif c=='c':
delete4()
else:
print('Enter correct choice...!!')
else:
print('Enter correct choice..!!')
def insert1():
sname=input("Enter Student Name : ")
admno=int(input("Enter Admission No : "))
DOB=input("Enter Date of Birth(yyyy-mm-dd): ")
class=input("Enter class for admission: ")
city=input("Enter City : ")
db = student.connector.connect(user='root', password='tiger',
host='localhost',database='mysql')
cursor = db.cursor()
sql="INSERT INTO student(sname,admno,dob,class,city) VALUES
( '%s' ,'%d','%s','%s','%s')"%(sname,admno,dob,class,city)
try:
cursor.execute(sql)
db.commit()
except:
db.rollback()
db.close()
def display1():
try:
db = student.connector.connect(user='root', password='tiger',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM student"
cursor.execute(sql)
results = cursor.fetchall()
for c in results: sname = c[0]
admno= c[1]
dob=c[2]
class=c[3]
city=c[4]
print ("(sname=%s,admno=%d,dob=%s,class=%s,city=%s)" %
(sname,admno,dob,class,city))
except:
print ("Error: unable to fetch data")
db.close()
def update1():
try:
db = student.connector.connect(user='root', password='tiger',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM student"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
sname = c[0]
admno= c[1]
dob=c[2]
class=c[3]
city=c[4]
except:
print ("Error: unable to fetch data")
print()
tempst=int(input("Enter Admission No : "))
temp=input("Enter new class : ")
try:
sql = "Update student set class=%s where admno='%d'" % (temp,tempst)
cursor.execute(sql)
db.commit()
except Exception as e:
print (e)
db.close()
def delete1():
try:
db = student.connector.connect(user='root', password='tiger',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM student"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
sname = c[0]
admno= c[1]
dob=c[2]
class=c[3]
city=c[4]
except:
print ("Error: unable to fetch data")
temp=int(input("\nEnter adm no to be deleted : "))
try:
sql = "delete from student where admno='%d'" % (temp)
ans=input("Are you sure you want to delete the record(y/n) : ")
if ans=='y' or ans=='Y':
cursor.execute(sql)
db.commit()
except Exception as e:
print (e)
db.close()
def insert2():
ename=input("Enter Employee Name : ")
empno=int(input("Enter Employee No : "))
job=input("Enter Designation: ")
joindate=input("Enter date of joining: ")
db = student.connector.connect(user='root', password='tiger',
host='localhost',database='mysql')
cursor = db.cursor()
sql="INSERT INTO emp(ename,empno,job,joindate) VALUES ( '%s' ,'%d','%s','%s')"%
(ename,empno,job,joindate)
try:
cursor.execute(sql)
db.commit()
except:
db.rollback()
db.close()
def display2():
try:
db = student.connector.connect(user='root', password='tiger',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM emp"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
ename = c[0]
empno= c[1]
job=c[2]
joindate=c[3]
print ("(empno=%d,ename=%s,job=%s,joindate=%s)" % (empno,ename,job,joindate))
except:
print ("Error: unable to fetch data")
db.close()
def update2():
try:
db = student.connector.connect(user='root', password='tiger',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM emp"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
ename = c[0]
empno= c[1]
job=c[2]
joindate=c[3]
except:
print ("Error: unable to fetch data")
print()
tempst=int(input("Enter Employee No : "))
temp=input("Enter new designation : ")
try:
sql = "Update emp set job=%s where empno='%d'" % (temp,tempst)
cursor.execute(sql)
db.commit()
except Exception as e:
print (e)
db.close()
def delete2():
try:
db = student.connector.connect(user='root', password='tiger',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM emp"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
ename = c[0]
empno= c[1]
job=c[2]
joindate=c[3]
except:
print ("Error: unable to fetch data")
temp=int(input("\nEnter emp no to be deleted : "))
try:
sql = "delete from emp where empno='%d'" % (temp)
ans=input("Are you sure you want to delete the record(y/n) : ")
if ans=='y' or ans=='Y':
cursor.execute(sql)
db.commit()
except Exception as e:
print (e)
db.close()
def insert3():
admno=int(input("Enter adm no: "))
fee=float(input("Enter fee amount : "))
month=input("Enter Month: ")
db = student.connector.connect(user='root', password='tiger',
host='localhost',database='mysql')
cursor = db.cursor()
sql="INSERT INTO fee(admno,fee,month) VALUES ( '%d','%d','%s')"%(admno,fee,month)
try: cursor.execute(sql)
db.commit()
except:
db.rollback()
db.close()
def display3():
try:
db = student.connector.connect(user='root', password='tiger',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM fee"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
admno= c[0]
fee=c[1]
month=c[2]
print ("(admno=%d,fee=%s,month=%s)" % (admno,fee,month))
except:
print ("Error: unable to fetch data")
db.close()
def update3():
try:
db = student.connector.connect(user='root', password='tiger',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM fee"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
admno= c[0]
fee=c[1]
month=c[2]
except:
print ("Error: unable to fetch data")
print()
tempst=int(input("Enter Admission No : "))
temp=input("Enter new class : ")
try:
sql = "Update fee set month=%s where admno='%d'" % (temp,tempst)
cursor.execute(sql)
db.commit()
except Exception as e:
print (e)
db.close()
def delete3():
try:
db = student.connector.connect(user='root', password='tiger',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM fee"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
admno= c[0]
fee=c[1]
month=c[2]
except:
print ("Error: unable to fetch data")
temp=int(input("\nEnter adm no to be deleted : "))
try:
sql = "delete from student where admno='%d'" % (temp)
ans=input("Are you sure you want to delete the record(y/n) : ")
if ans=='y' or ans=='Y':
cursor.execute(sql)
db.commit()
except Exception as e:
print (e)
db.close()
def insert4():
sname=input("Enter Student Name : ")
admno=int(input("Enter Admission No : "))
per=float(input("Enter percentage : "))
res=input("Enter result: ")
db = student.connector.connect(user='root', password='tiger',
host='localhost',database='mysql')
cursor = db.cursor()
sql="INSERT INTO exam(sname,admno,per,res) VALUES ( '%s' ,'%d','%s','%s')"%
(sname,admno,per,res)
try:
cursor.execute(sql)
db.commit()
except:
db.rollback()
db.close()
def display4():
try:
db = student.connector.connect(user='root', password='tiger',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM exam"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
sname = c[0]
admno= c[1]
dob=c[2]
class=c[3]
city=c[4]
print ("(sname,admno,per,res)"%(sname,admno,per,res) )
except:
print ("Error: unable to fetch data")
db.close()
def update4():
try:
db = student.connector.connect(user='root', password='tiger',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM exam"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
sname = c[0]
admno= c[1]
dob=c[2]
class=c[3]
city=c[4]
except:
print ("Error: unable to fetch data")
print()
tempst=int(input("Enter Admission No : "))
temp=input("Enter new result : ")
try:
sql = "Update student set res=%s where admno='%d'" % (temp,tempst)
cursor.execute(sql)
db.commit()
except Exception as e:
print (e)
db.close()
def delete4():
try:
db = student.connector.connect(user='root', password='tiger',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM exam"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
sname = c[0]
admno= c[1]
dob=c[2]
class=c[3]
city=c[4]
except:
print ("Error: unable to fetch data")
temp=int(input("\nEnter adm no to be deleted : "))
try:
sql = "delete from exam where admno='%d'" % (temp)
ans=input("Are you sure you want to delete the record(y/n) : ")
if ans=='y' or ans=='Y':
cursor.execute(sql)
db.commit()
except Exception as e:
print (e)
db.close()
selection()
OUTPUTS:
INSERT DETAILS
UPDATE DETAILS
DELETE DETAILS

CONCLUSION
This project is made in order to replace the
manual work, i.e. like writing down
customer details etc. This also helps to
save space and save money.

THANK YOU !!!

You might also like