You are on page 1of 17

COMPUTER SCIENCE

PROJECT FILE
ON
SCHOOL MANAGEMENT
SYSTEM

PROJECT PREPARED BY:


Abhay Shinde
Roll No.11620176
XII A
Session: 2021-2022
Bharatiya Vidya Bhavan’s V. M Public School
TABLE OF CONTENTS
⮚Synopsis

⮚Certificate

⮚Acknowledgement

⮚Modules

⮚Coding

⮚Outputs

⮚Bibliography
SYNOPSIS
Topic:
School management system

Features: 
● To manage the information about students, teachers, classes.
● Editing, adding and updating of records will be easier and
improved and result in proper resource management of school
data.
● Provide filters which could help decrease time and increase
the efficiency of the management system.
● You can export the data as Excel sheet in csv format which
can help the management to extract the data easily and
efficiently.
● This program would be user friendly so that teachers and
officials would be able to access the data easily.

Hardware/Software Requirements:
● 2gb storage on disk and 4gb ram(recommended)
● 64 bit Intel/Amd processor
● windows 7 or higher.
● python and Microsoft excel installed on the system.

Future Scope:
In the future this management of the system can be
easily improved and made more user friendly by making changes in
the program.

Limitations:
To make changes to improve the system, a person with
certain knowledge of programming would be required.
Made By: Accepted/Rejected
Abhay Shinde
Certificate
This is to certify that Abhay Shinde of Std. XII A,
Bharatiya Vidya Bhavan’s V.M Public School,
Vadodara has successfully completed a project entitled
School Management System in computer practicals for
the AISSCE as prescribed by CBSE in the year 2021-
2022.

Date:

Roll No. :11620176

Signature of Internal Signature of External


Examiner Examiner

__________________ __________________
Acknowledgement
I would like to express a deep sense of thanks &
gratitude to my computer science teacher Mrs. Sonal
Sharma for guiding me immensely through the course
of the project.
My sincere thanks to our Principal Mr. Rajeev Singhal
for his co-ordination in extending every possible
support for the completion of the project.
MODULES USED

1. import csv
2. Import os
import csv
CODING
import os
newpath = r'C:\school'
if not os.path.exists(newpath):
os.makedirs(newpath)
f=open("C:/school/students.csv","a+")
f.seek(0)
a=str(f.read(5))
l=["CLASS","SECTION","GR.NO","FIRST NAME","LAST NAME","GENDER"]
if a!="CLASS":
f1=open("C:/school/students.csv","w",newline="")
a=csv.writer(f1)
a.writerow(l)
f1.close()
f.close()
f=open("C:/school/teachers.csv","a+")
f.seek(0)
a=str(f.read(5))
if a!="CLASS":
l[2]="T.NO"
f1=open("C:/school/teachers.csv","w",newline="")
a=csv.writer(f1)
a.writerow(l)
f1.close()
f.close()

print("1:Enter a new student","2:Remove an existing student","3:Search a


student",sep="\n")
print("4:Enter a new teacher","5:Remove an existing teacher","6:Search a
teacher",sep="\n")
print("7.View a class")
main=int(input("enter the number-",))

if main==1:
f=open("C:/school/students.csv","a+",newline="")
f.seek(0)
r=len(f.readlines())
f.seek(0)
f.readline()
for i in range(r-1):
a=f.readline().split(sep=",")
if a[2]!="":
r=int(a[2])+1
else:
r=r
a=csv.writer(f)
c=input("enter the class-"),print(end="")
s=input("enter the section-").capitalize()
n1=input("enter the first name-").capitalize()
n2=input("enter the last name-").capitalize()
g=input("enter the gender-").capitalize()
l=[c,s,r,n1,n2,g]
print("Class-",c,s)
print("Name-",n1,n2)
print("Gender-",g)
b=input("Enter this record(Y/N)-").capitalize()
if b=="Y":
a.writerow(l)
print("Record successfully added")
else:
print("Record not added")
f.close()

elif main==2:
n1=input("enter the first name-").capitalize()
n2=input("enter the last name-").capitalize()
f=open("C:/school/students.csv","r")
r=len(f.readlines())
f.seek(0)
f.readline()
l=["CLASS","SECTION","GR.NO","FIRST NAME","LAST NAME","GENDER"]
l1=[]
f3=open("C:/school/studentsremoved.csv","a+",newline="")
f3.seek(0)
a=str(f3.read(5))
if a!="CLASS":
f1=open("C:/school/studentsremoved.csv","w",newline="")
a=csv.writer(f1)
a.writerow(l)
f1.close()
d=csv.writer(f3)
y=0
for i in range(r-1):
a=f.readline().split(sep=",")
if a[5]=="Male\n":
a[5]="Male"
else:
a[5]="Female"
if n1!=a[3] or n2!=a[4]:
l1.append(a)
else:
y=y+1
print("Class-",a[0],a[1])
print("Gr.no-",a[2])
print("Name-",a[3],a[4])
print("Gender-",a[5])
b=input("Remove this record(Y/N)-").capitalize()
if b=="Y":
d.writerow(a)

else:
l1.append(a)
f3.close()
x=(len(l1))
if r-1==x:
if y==0:
print("Record not found")
else:
print("Record found but not removed")
else:
print("Record removed successfully")
f2=open("C:/school/students.csv","w",newline="")
c=csv.writer(f2)
c.writerow(l)
f2.close()
f1=open("C:/school/students.csv","a",newline="")
for i in range(x):
b=csv.writer(f1)
b.writerow(l1[i])
f1.close()
f.close()

elif main==3:
f=open("C:/school/students.csv","r")
r=len(f.readlines())
firstname=input("enter the first name-").capitalize()
lastname=input("enter the lastname-").capitalize()
f.seek(0)
a=f.readline()
x=0
for i in range (r-1):
b=f.readline()
c=b.split(sep=",")
if firstname==c[3] and lastname==c[4]:
if c[5]=="Male\n":
c[5]="Male"
else:
c[5]="Female"
print("Class-",c[0],c[1])
print("Gr.no-",c[2])
print("Gender-",c[5])
print()
x=x+1
if x==0:
print("No Record Found")
f.close()

elif main==4:
f=open("C:/school/teachers.csv","a+",newline="")
f.seek(0)
r=len(f.readlines())
f.seek(0)
f.readline()
for i in range(r-1):
a=f.readline().split(sep=",")
if a[2]!="":
r=int(a[2])+1
else:
r=r
a=csv.writer(f)
c=input("enter the class-")
s=input("enter the section-").capitalize()
n1=input("enter the first name-").capitalize()
n2=input("enter the last name-").capitalize()
g=input("enter the gender-").capitalize()
l=[c,s,r,n1,n2,g]
print("Class-",c,s)
print("Name-",n1,n2)
print("Gender-",g)
b=input("Enter this record(Y/N)-").capitalize()
if b=="Y":
a.writerow(l)
print("Record sucessfully added")
else:
print("Record not added")
f.close()

elif main==5:
n1=input("enter the first name-").capitalize()
n2=input("enter the last name-").capitalize()
f=open("C:/school/teachers.csv","r")
r=len(f.readlines())
f.seek(0)
f.readline()
l=["CLASS","SECTION","GR.NO","FIRST NAME","LAST NAME","GENDER"]
l1=[]
f3=open("C:/school/teachersremoved.csv","a+",newline="")
f3.seek(0)
a=str(f3.read(5))
if a!="CLASS":
l[2]="T.NO"
f1=open("C:/school/teachersremoved.csv","w",newline="")
a=csv.writer(f1)
a.writerow(l)
f1.close()
d=csv.writer(f3)
y=0
for i in range(r-1):
a=f.readline().split(sep=",")
if a[5]=="Male\n":
a[5]="Male"
else:
a[5]="Female"
if n1!=a[3] or n2!=a[4]:
l1.append(a)
else:
y=y+1
print("Class-",a[0],a[1])
print("T.no-",a[2])
print("Name-",a[3],a[4])
print("Gender-",a[5])
b=input("Remove this record(Y/N)-").capitalize()
if b=="Y":
d.writerow(a)

else:
l1.append(a)
f3.close()
x=(len(l1))
if r-1==x:
if y==0:
print("Record not found")
else:
print("Record found but not removed")
else:
print("Record removed succesfully")
f2=open("C:/school/teachers.csv","w",newline="")
c=csv.writer(f2)
c.writerow(l)
f2.close()
f1=open("C:/school/teachers.csv","a",newline="")
for i in range(x):
b=csv.writer(f1)
b.writerow(l1[i])
f1.close()
f.close()

elif main==6:
f=open("C:/school/teachers.csv","r")
r=len(f.readlines())
firstname=input("enter the firstname-").capitalize()
lastname=input("enter the lastname-").capitalize()
f.seek(0)
a=f.readline()
x=0
for i in range (r-1):
b=f.readline()
c=b.split(sep=",")
if firstname==c[3] and lastname==c[4]:
if c[5]=="Male\n":
c[5]="Male"
else:
c[5]="Female"
print("Class-",c[0],c[1])
print("T.no-",c[2])
print("Gender-",c[5])
print()
x=x+1
if x==0:
print("No Record Found")
f.close()

elif main==7:
c=input("enter the class-").capitalize()
s=input("enter the section-").capitalize()
f=open("C:/school/class.csv","w+",newline="")
print("Open the csv file class.csv in the file directory C:/school ")
d=csv.writer(f)
l=["CLASS","SECTION","GR.NO","FIRST NAME","LAST NAME","GENDER"]
d.writerow(l)
f1=open("C:/school/students.csv","r")
r=len(f1.readlines())
f1.seek(0)
f1.readline()
for i in range(r-1):
a=f1.readline()
b=a.split(sep=",")
if b[0]==c and b[1]==s:
if b[5]=="Male\n":
b[5]="Male"
else:
b[5]="Female"
d.writerow(b)
f2=open("C:/school/teachers.csv","r")
r=len(f2.readlines())
d.writerow("")
d.writerow("")
f2.seek(0)
f2.readline()
for i in range(r-1):
a=f2.readline().split(sep=",")
if a[0]==c and a[1]==s:
l=["Class Teacher-",a[3],a[4]]
d.writerow(l)
f2.close()
f1.close()
else:
print("enter a valid number")
f.close()

OUTPUTS
BIBLIOGRAPHY

COMPUTER SCIENCE WITH PYTHON BY :– 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

You might also like