CS Project
CS Project
print("==STUDENT==MANAGEMENT==SYSTEM==")
print("===============================")
mycon=con.connect(host="localhost",user="root",password="ROOT",database="school")
c=mycon.cursor()
def add():
if a==1:
mycon.commit()
elif a==2:
a4=int(input("marks in chem:"))
a5=int(input("marks in maths"))
mycon.commit()
print("record added")
def tc():
if a==1:
mycon.commit()
elif a==2:
mycon.commit()
print("record deleted")
def upd():
if a==1:
if b==1:
mycon.commit()
elif b==2:
d=input("new name")
mycon.commit()
elif b==3:
mycon.commit()
elif b==4:
mycon.commit()
elif b==5:
mycon.commit()
elif a==2:
if b==1:
mycon.commit()
elif b==2:
d=input("new name")
mycon.commit()
elif b==3:
mycon.commit()
elif b==4:
mycon.commit()
elif b==5:
mycon.commit()
print("record updated")
def ch():
if a==1:
x=c.fetchall()
print(x)
elif a1==2:
b=int(input("addmision no of student"))
print(c.fetchone())
elif a==2:
if a1==1:
x=c.fetchall()
print(x)
elif a1==2:
b=int(input("roll no of student"))
print(c.fetchone())
n="y"
while n=="y":
if x==1:
add()
elif x==2:
tc()
elif x==3:
upd()
elif x==4:
ch()