Undertaking
Undertaking
UNDERTAKING
1|Page
COMPUTER SCIENCE 2022-23
CERTIFICATE
2|Page
COMPUTER SCIENCE 2022-23
ACKNOWLEDGEMENT
3|Page
COMPUTER SCIENCE 2022-23
CONTENTS
Undertaking.
Certificate.
Acknowledgement.
Introduction of the project.
System requirements of the project.
Source Code.
Output.
Bibliography.
4|Page
COMPUTER SCIENCE 2022-23
INTRODUCTION
We the students of CLASS XII A of KENDRIYA VIDYALAYA
BIRPUR have been assigned the work of “STUDENT
MANAGEMENT SYSTEM”.
To perform this task the students were divided into the group of
four students named as MANJEET SINGH RANA, ARPAN
JHAKRI MAGAR, GAURAV MEHTA.
5|Page
COMPUTER SCIENCE 2022-23
6|Page
COMPUTER SCIENCE 2022-23
SOURCE CODE
# A project by
# Manjeet Singh Rana
# of class 12th on
#topic of student managment using mysql
import mysql.connector
mydb = mysql.connector.connect(host ="localhost",user ="root",passwd = “root”)
mycur = mydb.cursor()
mycur.execute("create database if not exists student_db1")
mycur.execute("use student_db1")
abc="Y"
print(" ================================= \n
================================= \n === MANJEET SINGH RANA 12th ==== \n
================================= \n ================================= \n \n")
def while_fn ():
while abc=="Y" or abc=="y":
if menu==1:
userinput()
elif menu==2:
search_fn()
menu_fn()
while abc=="N" or abc=="n":
if menu==1 and abc=="N" or abc=="n":
userinput()
elif menu==2:
search_fn()
menu_fn
def userinput ():
roll=str(input("enter roll no. of the student : "))
name=str(input("enter name of the student : "))
dob=str(input("enter year of birth of the student : "))
att=str(input("enter attendence of the student P/A : "))
creat_tb = "create table if not exists student_tb ( sroll varchar(30) primary key, sname varchar(30),
sdob varchar(30), satt varchar(30))"
mycur.execute(creat_tb)
colum_tb = "insert into student_tb (sroll, sname, sdob, satt) values
('"+roll+"','"+name+"','"+dob+"','"+att+"')"
mycur.execute(colum_tb)
mydb.commit()
mycur.execute("select * from student_tb")
result = mycur.fetchall()
print("|| roll || name || birth y || attendence || ")
for x in result:
print(x)
global abc
abc = input("do you want to continue adding student ? [y/n]: ")
7|Page
COMPUTER SCIENCE 2022-23
menu_fn ()
while_fn
8|Page
COMPUTER SCIENCE 2022-23
OUTPUT
9|Page
COMPUTER SCIENCE 2022-23
10 | P a g e
COMPUTER SCIENCE 2022-23
11 | P a g e
COMPUTER SCIENCE 2022-23
12 | P a g e
COMPUTER SCIENCE 2022-23
REFERENCES
Python class 12th book
Python class 11th book Internet
web pages: https://www.w3schools.com/,
https://www.geeksforgeeks.org/, https://google.com , etc
13 | P a g e