0% found this document useful (0 votes)
10 views19 pages

Akash 30

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

Akash 30

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

-:PROJECTFILE:-

NAGAJISARASWATIVIDYAMANDIR
MALDEYPUR, BALLIA(277001)

NAME:-Akash Barnwal
Class: 12th‘D’
RollNo: 30
Subject:Computer Science
Topic:“Student Management
System”

Signature of Internal Signature of External


Examiner Examiner
-:CERTIFICATE:-

This is to certify that COMPUTER SCIENCE


project titled ‘STUDENT MANAGEMENT
SYSTEM’ has been successfully completed
By Akash Barnwal
Of Class XII‘D’ in the partial fulfilment
Of CENTRAL BOARD OF SECONDARY
EDUCATION(CBSE) In the Year of
2025-26.

Signature of Internal SignatureofExternal


Examiner Examiner
Acknowledgement

I would like to express a deep sense of thanks


& gratitude to my project guide Mr. Arvind
Kumar Pandey Sir immensely through the
course of project. He always evinced keen
interest in my work. Her constructive advice &
constant motivation has been responsible for
the successful completion of this project. I also
thank to my parents for their motivation and
support. I must thank to my classmates as well.
Last but not least; I would like to thank all those
who had supported me directly and indirectly in
any manner for completion of this project.

Thanking You!!
CODING
#STUDENTS MARKS MANAGEMENT
import [Link]
as sql import sys

#connect to my sql database


db=[Link](host="localhost",user="root",passwd="ajaysh
arma08",database="mysql")
cursor=[Link]()
#check data base is
connected if
db.is_connected():
print("Database connected")

#MENU FOR STUDENT MARKS MANAGEMENT SYSTEM


SOFTWARE
print("********************************************
*****")
print("WELCOME TO MY PROJECT STUDENT MARKS
MANAGEMENT SYSTEM")
print("********************************************
*****")
print()
while(1):
print("1:TO CREATE TABLE FOR THE FIRST
TIME") print("2:TO DISPLAY TABLES OF
DATABASE") print("3:TO SHOW FIELDS OF
TABLE") print("4:TO DISPLAY ALL DATA")
print("5:TO ADD NEW STUDENT")
print("6:TO SEARCH A STUDENT RECORD")
print("7:TOCHANGEMARKSOFSTUDENT")
print("8:TO DELETE STUDENT ")
print("9:EXIT")
print()
ch=int(input("ENTER YOUR CHOICE"))
#Creating table for the first time
if ch==1:
try:
print("Creating STUDENT table")
sql = "CREATE TABLE student (ROLL int(4) PRIMARY
KEY, name varchar(15) NOT NULL,classchar(3)NOT NULL,sec
char(1),mark1 int(4),mark2 int(4),mark3 int(4),mark4
int(4),mark5 int(4),total int(4),per float(4));"
[Link](sql)
[Link]()
except:
print("sorrysomeerroroccured")
#Displaying tables of database
ifch==2:
try:
[Link]("showtables")
for i in cursor:
print(i)
except:
print("sorry some error occured")
#Displaying Tables fields
ifch==3:
try:
table=input("enter table name")
[Link]("desc %s"%table)
for i in cursor:
print(i)
except:
print("sorry some error occured")
#Displaying all records of table
ifch==4:
try:
[Link]("select * fromstudent")
data=[Link]()
print("ROLL NO","STUDENT
NAME","CLASS","SECTION","SUBJECT1","SUBJECT2","SUBJEC
T3","SUBJECT4","SUBJECT5","TOTALMARKS","PERCENTAGE")
for i in data:
j=str(i).split()
for k in j:
print(k,end=" ")
print()
except:
print("SORRY SOME ERROR OCCURED")
#inserting new record into table
if ch==5:
r=int(input("Enter student roll number"))
name=input("ENTER STUDENT NAME")
c=input("ENTER CLASS OF STUDENT")
s=input("ENTER SECTION OF STUDENT")
m1=int(input("ENTER MARKS IN SUBJECT1"))
m2=int(input("ENTER MARKS IN SUBJECT2"))
m3=int(input("ENTER MARKS IN SUBJECT3"))
m4=int(input("ENTER MARKS IN SUBJECT4"))
m5=int(input("ENTER MARKS IN SUBJECT5"))
t=m1+m2+m3+m4+m5
per=t/5
query="insert into student values(%d,'%s','%s','%s',%d,
%d,%d,%d,%d,%d,%d)"%(r,name,c,s,m1,m2,m3,m4,m5,t,per)
[Link](query)
print("STUDENT RECORD SAVED IN TABLE")
[Link]()
#searching student details
ifch==6:
print("1:TO SERACH BY STUDENT ROLL NUMBER")
print("2:TO SEARCH BY STUDENT NAME")
c=int(input("ENTER YOUR CHOICE"))
#searching by student rollnumber
if c==1:
try:
roll=int(input("ENTERSTUDENTROLLNUMBERTO SEARCH"))
qry="select*from studen twhere roll=%d"%roll
[Link](qry)
data=[Link]()
if len(data)==0:
print("STUDENT NOT FOUND")
print("ROLL NO","STUDENT
NAME","CLASS","SECTION","SUBJECT1","SUBJECT2","SUBJEC
T3","SUBJECT4","SUBJECT5","TOTALMARKS","PERCENTAGE")
for i in data:
j=str(i).split()
for k in j:
print(k,end=" ")
print()
except:
print("SORRY SOME ERROR OCCURED")

#searching by student name


if c==2:
try:
name=input("ENTER STUDENT NAME TO SEARCH")
qry="select*from student where name='%s'"%name
[Link](qry)
data=[Link]()
if len(data)==0:
print("STUDENT NOT FOUND")
print("ROLL NO","STUDENT
NAME","CLASS","SECTION","SUBJECT1","SUBJECT2","SUBJEC
T3","SUBJECT4","SUBJECT5","TOTALMARKS","PERCENTAGE")
for i in data:
j=str(i).split()
for k in j:
print(k,end=" ")
print()
except:
print("SORRY SOME ERROR OCCURED")

#TO update student marks


if ch==7:
try:
roll=int(input("ENTER ROLL NUMBER OF STUDENT
WHOSE MARKS TO BE UPDATE"))
qry="select*from student where roll=%d"%roll
[Link](qry)
data=[Link]()
if len(data)==0:
print("STUDENT NOT FOUND")
else:
m1=int(input("ENTER UPDATED MARKS IN
SUBJECT1"))
m2=int(input("ENTER UPDATED MARKS IN
SUBJECT2"))
m3=int(input("ENTER UPDATED MARKS IN
SUBJECT3"))
m4=int(input("ENTER UPDATED MARKS IN
SUBJECT4"))
m5=int(input("ENTER UPDATED MARKS IN
SUBJECT5"))
t=m1+m2+m3+m4+m5
per=t/5
qry="update STUDENT SET mark1=%d,mark2=
%d,mark3=%d,mark4=%d,mark5=%d,total=%d,per=%dwhere
roll=%d"%(m1,m2,m3,m4,m5,t,per,roll)
[Link](qry)
print("STUDENT RECORD UPDATED")
[Link]()
except:
print("SORRY SOME ERROR OCCURED")

#Delete student record from table


if ch==8:
try:
roll=int(input("ENTER STUDENT ROLL NUMBER,YOU
WANT TO DELETE"))
qry="select*from student wherer oll=%d"%roll
[Link](qry)
data=[Link]()
if len(data)==0:
print("STUDENT NOT FOUND IN TABLE")
else:
qry="delete from student where roll=%d"%(roll)
[Link](qry)
print("STUDENT RECORD DELETED FROM TABLE")
[Link]()
except:
print("SORRY SOME ERROR OCCURED")

#Exit from program


if ch==9:
[Link]()

[Link]()
OUTPUT

Database connected

WELCOME TO MY PROJECT STUDENT MARKS MANAGEMENT SYSTEM

1:TO CREATE TABLE FOR THE FIRST TIME

2:TO DISPLAY TABLES OF DATABASE

3:TO SHOW FIELDS OF TABLE

4:TO DISPLAY ALL DATA

5:TO ADD NEW STUDENT

6:TO SEARCH A STUDENT RECORD

7:TO CHANGE MARKS OF STUDENT

8:TO DELETE STUDENT

9:EXIT

ENTER YOUR CHOICE

9:EXIT

ENTER YOUR CHOICE2

('student',)

1:TO CREATE TABLE FOR THE FIRST TIME

2:TO DISPLAY TABLES OF DATABASE

3:TO SHOW FIELDS OF TABLE

4:TO DISPLAY ALL DATA

5:TO ADD NEW STUDENT


6:TO SEARCH A STUDENT RECORD

7:TO CHANGE MARKS OF STUDENT

8:TO DELETE STUDENT

9:EXIT

ENTER YOUR CHOICE

ENTER YOUR CHOICE3


enter table namestudent
('ROLL','int(4)','NO','PRI',None,'')
('name','varchar(15)','NO',None,'')
('class','char(3)','NO',None,'')
('sec','char(1)','YES',None,'')
('mark1','int(4)','YES',None,'')
('mark2','int(4)','YES',None,'')
('mark3','int(4)','YES',None,'')
('mark4','int(4)','YES',None,'')
('mark5','int(4)','YES',None,'')
('total','int(4)','YES',None,'')
('per','float','YES',None,'')
1:TO CREATE TABLE FOR THE FIRST TIME
2:TO DISPLAY TABLES OF DATABASE
3:TO SHOW FIELDS OF TABLE
4:TO DISPLAY ALL DATA
5:TO ADD NEW STUDENT
6:TO SEARCH A STUDENT RECORD
7:TO CHANGE MARKS OF STUDENT
8:TO DELETE STUDENT
9:EXIT
ENTER YOUR CHOICE

9:EXIT

ENTER YOUR CHOICE4

ROLL NO STUDENT NAME CLASS SECTION SUBJECT1 SUBJECT2 SUBJECT3


SUBJECT4 SUBJECTS TOTALMARKS PERCENTAGE

1:TO CREATE TABLE FORTHE FIRSTT IME

2:TO DISPLAY TABLE SOF DATABASE

3:TO SHOW FIELDS OF TABLE

4:TO DISPLAY ALL DATA

5:TO ADD NEW STUDENT

6:TO SEARCH A STUDENT RECORD

7:TOCHANGEMARKSOFSTUDENT

8:TO DELETE STUDENT

9:EXIT

ENTER YOUR CHOICE

9: EXIT

ENTERYOURCHOICE5

Enter student roll number1

ENTER STUDENT NAMEAjay

ENTER CLASS OF STUDENT12


ENTER SECTION OF STUDENTE

ENTER MARKS IN SUBJECT190

ENTER MARKS IN SUBJECT2100

ENTER MARKS IN SUBJECT390

ENTER MARKS IN SUBJECT4100

ENTER MARKS IN SUBJECT5100

STUDENT RECORD SAVED IN TABLE

1:TO CREATE TABLE FOR THE FIRST TIME

2:TO DISPLAY TABLES OF DATABASE

3:TO SHOW FIELDS OF TABLE

4:TO DISPLAY ALL DATA

5:TO ADD NEW STUDENT

6:TO SEARCH A STUDENT RECORD

7:TO CHANGE MARKS OF STUDENT

8:TO DELETE STUDENT

9:EXIT

ENTER YOUR CHOICE

ENTER YOUR CHOICE6

1:TO SERACH BY STUDENT ROLL NUMBER

2:TO SEARCH BY STUDENT NAME


ENTER YOUR CHOICE2

ENTER STUDENT NAME TO SEARCHAjay

ROLL NO STUDENT NAME CLASS SECTION SUBJECT1 SUBJECT2 SUBJECT3


SUBJECT4 SUBJECTS TOTALMARKS PERCENTAGE

(1,'Ajay','12','E',90,100,90,100,100,480,96.0) 1:TO

CREATE TABLE FOR THE FIRST TIME

2:TO DISPLAY TABLES OF DATABASE

3:TO SHOW FIELDS OF TABLE

4:TO DISPLAY ALL DATA

5:TO ADD NEW STUDENT

6:TO SEARCH A STUDENT RECORD

7:TO CHANGE MARKS OF STUDENT

8:TO DELETE STUDENT

9:EXIT

ENTER YOUR CHOICE

9:EXIT

ENTER YOUR CHOICE7

ENTER ROLL NUMBER OF STUDENT WHOSE MARKS TO BE UPDATE1

ENTER UPDATED MARKS IN SUBJECT1100

ENTER UPDATED MARKS IN SUBJECT2100

ENTER UPDATED MARKS IN SUBJECT3100


ENTER UPDATED MARKS IN SUBJECT4100

ENTER UPDATED MARKS IN SUBJECT5100

STUDENT RECORD UPDATED

1:TO CREATE TABLE FOR THE FIRST TIME

2:TO DISPLAY TABLES OF DATABASE

3:TO SHOW FIELDS OF TABLE

4:TO DISPLAY ALL DATA

5:TO ADD NEW STUDENT

6:TO SEARCH A STUDEN TRECORD

7:TO CHANGE MARKS OF STUDENT

8:TO DELETE STUDENT

9:EXIT

ENTER YOUR CHOICE

ENTER YOUR CHOICE8

ENTER STUDENT ROLL NUMBER,YOU WANT TO DELETE1

STUDENT RECORD DELETED FROM TABLE

1:TO CREATE TABLE FOR THE FIRST TIME

2:TO DISPLAY TABLES OF DATABASE

3:TO SHOW FIELDS OF TABLE

4:TO DISPLAY ALL DATA

5:TO ADD NEW STUDENT


6:TO SEARCH A STUDENT RECORD

7:TO CHANGE MARKS OF STUDENT

8:TO DELETE STUDENT

9:EXIT

ENTER YOUR CHOICE

You might also like