Final
Final
1. INTRODUCTION 2
2. FLOWCHART 3
4. OUTPUT 17-21
5. BIBLIOGRAPHY 22
1
INTRODUCTION
This project is made using SQL DBMS and Python connectivity with the
2
FLOWCHART
3
SOURCE CODE
import sys
db=sql.connect(host="localhost",user="root",
passwd="ajay sharma08",database="mysql")
cursor=db.cursor()
db.is_connected():
print("Database connected")
print("*************************************
******* *****")
print("WELCOME TO MY PROJECT”)
4
STUDENT MARKS MANAGEMENT SYSTEM")
print("*************************************
******* *****")
print()
while(1):
STUDENT ")
print("9:EXIT") print()
5
ch=int(input("ENTER YOUR CHOICE"))
if ch==1:
try:
cursor.execute(sql)
mycon.commit()
except:
try:
6
cursor.execute("show
tables") for i in cursor:
print(i)
except:
try:
table=input("enter table
name") cursor.execute("desc
%s"%table) for i in
cursor:
print(i)
except:
7
records of table if
ch==4:
try:
cursor.execute("select * from
student") data=cursor.fetchall()
print("ROLL NO","STUDENT
NAME","CLASS","SECTION","SUBJECT1","SUB
JECT2","SUBJEC
T3","SUBJECT4","SUBJECT5","TOTALMARKS
","PERCENTAGE")
for i in data:
j=str(i).split()
for k in j:
print(k,end=" ")
print()
except:
8
record into table if
ch==5:
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
9
%d,%d)"%(r,name,
c,s,m1,m2,m3,m4,m5,t,per)
cursor.execute(query)
print("STUDENT RECORD
SAVED IN TABLE") db.commit()
#searching student details
if ch==6:
c==1:
try:
10
if len(data)==0:
for i in data:
j=str(i).split()
for k in j:
print(k,end=" ")
print()
except:
c==2:
try:
11
name=input("ENTER STUDENT NAME TO SEARCH")
cursor.execute(qry)
data=cursor.fetchall() if
len(data)==0:
for i in data:
j=str(i).split()
for k in j:
print(k,end=" ")
print()
except:
12
print("SORRY SOME ERROR
OCCURED")
ch==7:
try:
if len(data)==0: print("STUDENT
NOT FOUND")
else:
m1=int(input("ENTER UPDATED MARKS
IN SUBJECT1"))
13
m3=int(input("ENTER UPDATED MARKS
IN SUBJECT3"))
t=m1+m2+m3+m4+m5 per=t/5
cursor.execute(qry)
db.commit()
except:
14
# Delete student record from table if
ch==8:
try:
roll=int(input("ENTER STUDENT ROLL
NUMBER ,YOU WANT TO DELETE"))
if len(data)==0:
15
#Exit from program if
ch==9:
sys.exit()
db.close()
16
OUTPUT
17
18
19
20
21
BIBLIOGRAPHY
We referred our senior’s project and interacted with them about the
investigative project.
We also got various inputs from our friends and from AI tools.
1. https://www.w3schools.com/python/python_mysql_create_d
b.asp
2. https://www.w3schools.com/python/python_mysql_insert.as
3. https://www.w3schools.com/python/python_mysql_drop_tabl
e.asp
4. https://www.w3schools.com/python/python_mongodb_creat
e_collection.asp
22