0% found this document useful (0 votes)
42 views27 pages

Sushmita-School MANAGEMENT SYSTEM

Uploaded by

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

Sushmita-School MANAGEMENT SYSTEM

Uploaded by

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

COMPUTER

SCIENCE
PROJECT FILE
ON
School MANAGEMENT
SYSTEM

PROJECT PREPARED BY:


Sushmita
XII HUM
Session: 2020-2021
LORD MAHAVIR JAIN PUBLIC SCHOOL

1
TABLE OF
CONTENTS

➢ Certificate

➢ Acknowledgement

➢ Coding

➢ Screenshots

➢ Requirements

2
➢ Bibliography

Acknowledgement
I thank my Computer Science teacher Mrs.
Yogyata Jain for her guidance and support. I
also thank my Principal Mrs. Ruchi Sharma . I
would also like to thank my parents and for
encouraging me during the course of this project.
Finally I would like to thank CBSE for giving me
this opportunity to undertake this project.

3
Certificate
This is to certify that Sushmita of class
Twelve, Lord Mahavir Jain Public School,
Ambala Cantt, has successfully completed her
project in computer practical as prescribed by
CBSE.

Date :

4
Signature of Internal Signature of External
Examiner Examiner

__________________ __________________

CODING
5
import mysql.connector
def selection():
db =
mysql.connector.connect(host="localhost",user="root",passwd="user",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')

6
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()

7
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')

8
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): ")
cls=input("Enter class for admission: ")
cty=input("Enter City : ")
db =
mysql.connector.connect(host="localhost",user="root",passwd="user",database
="mysql")
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)

9
db.commit()
except:
db.rollback()
db.close()
#insert()

def display1():
try:
db =
mysql.connector.connect(host="localhost",user="root",passwd="user",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]
cls=c[3]
cty=c[4]
print ("(sname=%s,admno=%d,dob=%s,cls=%s,cty=%s)" %
(sname,admno,dob,cls,cty))
except:
print ("Error: unable to fetch data")
db.close()
def update1():
try:

10
db =
mysql.connector.connect(host="localhost",user="root",passwd="user",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]
cls=c[3]
cty=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 cls=%s where admno='%d'" % (temp,tempst)
cursor.execute(sql)
db.commit()
except Exception as e:
print (e)
db.close()
def delete1():
try:

11
db =
mysql.connector.connect(host="localhost",user="root",passwd="user",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]
cls=c[3]
cty=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 : ")

12
empno=int(input("Enter Employee No : "))
job=input("Enter Designation: ")
hiredate=input("Enter date of joining: ")
db = mysql.connector.connect(user='root', password='tiger',
host='localhost',database='mysql')
cursor = db.cursor()
sql="INSERT INTO emp(ename,empno,job,hiredate) VALUES
( '%s' ,'%d','%s','%s')"%(ename,empno,job,hiredate)
try:
cursor.execute(sql)
db.commit()
except:
db.rollback()
db.close()
def display2():
try:
db =
mysql.connector.connect(host="localhost",user="root",passwd="user",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]
hiredate=c[3]

13
print ("(empno=%d,ename=%s,job=%s,hiredate=%s)" %
(empno,ename,job,hiredate))
except:
print ("Error: unable to fetch data")
db.close()
def update2():
try:
db =
mysql.connector.connect(host="localhost",user="root",passwd="user",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]
hiredate=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()

14
except Exception as e:
print (e)
db.close()
def delete2():
try:
db =
mysql.connector.connect(host="localhost",user="root",passwd="user",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]
hiredate=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:

15
print (e)
db.close()
def insert3():
admno=int(input("Enter adm no: "))
fee=float(input("Enter fee amount : "))
month=input("Enter Month: ")
db =
mysql.connector.connect(host="localhost",user="root",passwd="user",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 =
mysql.connector.connect(host="localhost",user="root",passwd="user",database
="mysql")
cursor = db.cursor()
sql = "SELECT * FROM fee"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:

16
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 =
mysql.connector.connect(host="localhost",user="root",passwd="user",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)

17
db.commit()
except Exception as e:
print (e)
db.close()
def delete3():
try:
db =
mysql.connector.connect(host="localhost",user="root",passwd="user",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)

18
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 =
mysql.connector.connect(host="localhost",user="root",passwd="user",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 =
mysql.connector.connect(host="localhost",user="root",passwd="user",database
="mysql")
cursor = db.cursor()
sql = "SELECT * FROM exam"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:

19
sname = c[0]
admno= c[1]
dob=c[2]
cls=c[3]
cty=c[4]
print ("(sname,admno,per,res)"%(sname,admno,per,res) )
except:
print ("Error: unable to fetch data")
db.close()
def update4():
try:
db =
mysql.connector.connect(host="localhost",user="root",passwd="user",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]
cls=c[3]
cty=c[4]
except:
print ("Error: unable to fetch data")
print()
tempst=int(input("Enter Admission No : "))

20
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 =
mysql.connector.connect(host="localhost",user="root",passwd="user",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]
cls=c[3]
cty=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)

21
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()

SCREENSHOT
S
22
23
24
REQUIREMENTS
❖ HARDWARE REQUIRED

➢Printer, to print the required documents of


the project
➢Compact Drive
➢Processor : Pentium III
➢RAM : 64 MB
➢Hard Disk : 20 GB.

25
❖ SOFTWARE REQUIRED

➢Operating system : Windows 2007


➢Python and
➢Ms word, for presentation of output.
www.cbseportal.com
www.cbseportal.com
www.cbseportal.com
www.cbseportal.com
www.cbseportal.com
www.cbseportal.com

BIBLIOGRAPHY

26
COMPUTER SCIENCE IN PYTHON :– SUMITA ARORA
www.cbseportal.com
www.cbseportal.com
www.cbseportal.com
www.cbseportal.com
www.cbseportal.com
www.cbseportal.com
www.cbseportal.com
www.cbseportal.com
www.cbseportal.com
www.cbseportal.com
www.cbseportal.com
www.cbseportal.com
www.cbseportal.com
www.cbseportal.com
www.cbseportal.com
www.cbseportal.com

27

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy